mirror of
https://github.com/irmen/prog8.git
synced 2024-12-24 16:29:21 +00:00
fix IR peephole optimization
This commit is contained in:
parent
641f6c05d8
commit
92c012b55a
@ -439,7 +439,7 @@ class IRPeepholeOptimizer(private val irprog: IRProgram) {
|
|||||||
val prev = indexedInstructions[idx-1].value
|
val prev = indexedInstructions[idx-1].value
|
||||||
if(prev.opcode==Opcode.LOADM) {
|
if(prev.opcode==Opcode.LOADM) {
|
||||||
// loadm.X rX,something | storem.X rX,something ?? -> get rid of the store.
|
// loadm.X rX,something | storem.X rX,something ?? -> get rid of the store.
|
||||||
if(ins.labelSymbol!=null && ins.labelSymbol==prev.labelSymbol) {
|
if(ins.labelSymbol!=null && ins.labelSymbol==prev.labelSymbol && ins.labelSymbolOffset==prev.labelSymbolOffset) {
|
||||||
changed=true
|
changed=true
|
||||||
chunk.instructions.removeAt(idx)
|
chunk.instructions.removeAt(idx)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user