more optimizations, new one doesnt work yet

This commit is contained in:
SpookyDervish
2025-09-09 08:02:09 +10:00
parent e538b2e7ac
commit 132ed8ed12

View File

@@ -120,5 +120,17 @@ class X86_64Optimizer(Optimizer):
replace=[ replace=[
Instruction("push", ["x"]) Instruction("push", ["x"])
] ]
),
PeepholeRule(
match=[
Instruction("mov", ["a", "b"]),
Instruction("mov", ["c", "d"]),
Instruction("cmp", ["a", "d"])
],
replace=[
Instruction("mov", ["c", "d"]),
Instruction("cmp", ["b", "c"])
]
) )
] ]