[llvm-commits] CVS: llvm/test/Regression/Transforms/InstCombine/xor.ll
Chris Lattner
lattner at cs.uiuc.edu
Wed Jul 23 16:37:01 PDT 2003
Changes in directory llvm/test/Regression/Transforms/InstCombine:
xor.ll updated: 1.2 -> 1.3
---
Log message:
New testcases
---
Diffs of the changes:
Index: llvm/test/Regression/Transforms/InstCombine/xor.ll
diff -u llvm/test/Regression/Transforms/InstCombine/xor.ll:1.2 llvm/test/Regression/Transforms/InstCombine/xor.ll:1.3
--- llvm/test/Regression/Transforms/InstCombine/xor.ll:1.2 Wed Jul 23 16:11:56 2003
+++ llvm/test/Regression/Transforms/InstCombine/xor.ll Wed Jul 23 16:36:01 2003
@@ -48,8 +48,8 @@
%A1 = and int %A, 7
%B1 = and int %B, 128
- %OROK = xor int %A1, %B1
- ret int %OROK
+ %C1 = xor int %A1, %B1
+ ret int %C1
}
ubyte %test8(bool %c) {
@@ -65,4 +65,16 @@
%B = xor ubyte %A, 123 ; xor can be eliminated
%C = seteq ubyte %B, 34
ret bool %C
+}
+
+ubyte %test10(ubyte %A) {
+ %B = and ubyte %A, 3
+ %C = xor ubyte %B, 4 ; transform into an OR
+ ret ubyte %C
+}
+
+ubyte %test11(ubyte %A) {
+ %B = or ubyte %A, 12
+ %C = xor ubyte %B, 4 ; transform into an AND
+ ret ubyte %C
}
More information about the llvm-commits
mailing list