Skip to content

Commit b676f1e

Browse files
authored
[Cranelift] add variant versions of #11999 (#12008)
* add variants * fix
1 parent cd985e0 commit b676f1e

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

cranelift/codegen/src/opts/icmp.isle

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -303,8 +303,14 @@
303303
(rule (simplify (slt cty (bnot ty x) (bnot ty y))) (sgt cty x y))
304304

305305
;; a < b ^^ a > b => (a ≠ b)
306-
(rule (simplify (bxor ty (slt cty x y) (sgt cty x y))) (ne cty x y))
307-
(rule (simplify (bxor ty (ult cty x y) (ugt cty x y))) (ne cty x y))
306+
(rule (simplify (bxor ty (sgt ty x y) (sgt ty y x))) (ne ty x y))
307+
(rule (simplify (bxor ty (sgt ty x y) (slt ty x y))) (ne ty x y))
308+
(rule (simplify (bxor ty (slt ty x y) (sgt ty x y))) (ne ty x y))
309+
(rule (simplify (bxor ty (slt ty x y) (slt ty y x))) (ne ty x y))
310+
(rule (simplify (bxor ty (ugt ty x y) (ugt ty y x))) (ne ty x y))
311+
(rule (simplify (bxor ty (ugt ty x y) (ult ty x y))) (ne ty x y))
312+
(rule (simplify (bxor ty (ult ty x y) (ugt ty x y))) (ne ty x y))
313+
(rule (simplify (bxor ty (ult ty x y) (ult ty y x))) (ne ty x y))
308314

309315
;; a < b && a > b = false
310316
(rule (simplify (band ty (sgt ty x y) (slt ty x y))) (iconst_u ty 0))

0 commit comments

Comments
 (0)