mirror of
https://github.com/KarolS/millfork.git
synced 2025-01-01 06:29:53 +00:00
6502: Fix an optimization bug
This commit is contained in:
parent
5ad6da2be4
commit
d36b83421c
@ -102,7 +102,7 @@ object LaterOptimizations {
|
||||
|
||||
private def TwoDifferentLoadsWithNoFlagChangeInBetween(opcode1: Opcode.Value, middle: AssemblyLinePattern, opcode2: Opcode.Value, transferOpcode: Opcode.Value) = {
|
||||
(HasOpcode(opcode1) & MatchAddrMode(0) & MatchParameter(1)) ~
|
||||
(Linear & Not(ChangesMemory) & middle & Not(HasOpcode(opcode2))).* ~
|
||||
(Linear & Not(ChangesMemory) & DoesntChangeIndexingInAddrMode(0) & middle & Not(HasOpcode(opcode2))).* ~
|
||||
(HasOpcode(opcode2) & Elidable & MatchAddrMode(0) & MatchParameter(1)) ~~> { c =>
|
||||
c.init :+ AssemblyLine.implied(transferOpcode)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user