You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add algebraic simplification to peephole optimizer
This implements mathematical identity patterns on register operands:
- Self-subtraction: x - x → 0
- Self-XOR: x ^ x → 0
- Self-OR: x | x → x (identity)
- Self-AND: x & x → x (identity)
These patterns emerge after register allocation when different
variables are assigned to the same register. SSA handles constant
folding, peephole handles register-based patterns.
0 commit comments