cranelift: simplify ineg(ineg(x)) to x (#6033)

This commit is contained in:
Karl Meakin
2023-03-16 22:14:05 +00:00
committed by GitHub
parent 07136ae96d
commit dccc2d6269
2 changed files with 11 additions and 0 deletions

View File

@@ -32,6 +32,9 @@
x))
(ineg ty x))
;; ineg(ineg(x)) == x.
(rule (simplify (ineg ty (ineg ty x))) (subsume x))
;; x*1 == 1*x == x.
(rule (simplify (imul ty
x