[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/not.ll
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 10 17:14:01 PST 2003
Changes in directory llvm/test/Regression/Transforms/InstCombine:
not.ll updated: 1.6 -> 1.7
---
Log message:
Add test for demorgans law with constants
Add test for other form of demorgans
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/InstCombine/not.ll
diff -u llvm/test/Regression/Transforms/InstCombine/not.ll:1.6 llvm/test/Regression/Transforms/InstCombine/not.ll:1.7
--- llvm/test/Regression/Transforms/InstCombine/not.ll:1.6 Fri Aug 23 13:31:18 2002
+++ llvm/test/Regression/Transforms/InstCombine/not.ll Mon Mar 10 17:13:32 2003
@@ -29,3 +29,20 @@
%d = xor int %c, -1
ret int %d
}
+
+; Test that demorgens law can work with constants
+int %test4(int %A, int %B) {
+ %a = xor int %A, -1
+ %c = and int %a, 5 ; 5 = ~c2
+ %d = xor int %c, -1
+ ret int %d
+}
+
+; test the mirror of demorgans law...
+int %test5(int %A, int %B) {
+ %a = xor int %A, -1
+ %b = xor int %B, -1
+ %c = or int %a, %b
+ %d = xor int %c, -1
+ ret int %d
+}
More information about the llvm-commits
mailing list