We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 11251c6 commit 12b0fbeCopy full SHA for 12b0fbe
cranelift/codegen/src/opts/bitops.isle
@@ -41,6 +41,14 @@
41
;; not(not(x)) == x.
42
(rule (simplify (bnot ty (bnot ty x))) (subsume x))
43
44
+;; DeMorgan's rule (two versions):
45
+;; bnot(bor(x, y)) == band(bnot(x), bnot(y))
46
+(rule (simplify (bnot ty (bor ty x y)))
47
+ (band ty (bnot ty x) (bnot ty y)))
48
+;; bnot(band(x, y)) == bor(bnot(x), bnot(y))
49
+(rule (simplify (bnot ty (band t x y)))
50
+ (bor ty (bnot ty x) (bnot ty y)))
51
+
52
;; `or(and(x, y), not(y)) == or(x, not(y))`
53
(rule (simplify (bor ty
54
(band ty x y)
0 commit comments