Skip to content

Commit e2d77dc

Browse files
committed
fix shootout-keccak
1 parent d0c2d82 commit e2d77dc

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

cranelift/codegen/src/opts/transopt.isle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,6 +1689,9 @@
16891689
(rule (simplify (bxor ty (bxor ty x y) (bxor ty z y))) (bxor ty x z))
16901690
(rule (simplify (bxor ty (bxor ty x y) x)) y)
16911691
(rule (simplify (bxor ty (bxor ty x y) y)) x)
1692+
;; FIX: keccak
1693+
(rule (simplify (bxor ty (iconst_s ty -1) x)) (bnot ty x))
1694+
(rule (simplify (bxor ty x (iconst_s ty -1))) (bnot ty x))
16921695
(rule (simplify (bxor ty (eq ty (iconst cty x) y) (iconst_u ty 1))) (ne ty (iconst cty x) y))
16931696
(rule (simplify (bxor ty (eq ty (iconst cty x) y) (ne ty y (iconst cty x)))) (iconst_u ty 1))
16941697
(rule (simplify (bxor ty (eq ty x (iconst cty y)) (iconst_u ty 1))) (ne ty x (iconst cty y)))

0 commit comments

Comments
 (0)