aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Transforms/InstCombine/and.ll7
-rw-r--r--test/Transforms/InstCombine/or.ll12
2 files changed, 19 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/and.ll b/test/Transforms/InstCombine/and.ll
index 23a20fd46f..e0c4d180e1 100644
--- a/test/Transforms/InstCombine/and.ll
+++ b/test/Transforms/InstCombine/and.ll
@@ -58,3 +58,10 @@ bool %test9(uint %A) {
%C = cast uint %B to bool
ret bool %C
}
+
+uint %test10(uint %A) {
+ %B = and uint %A, 12
+ %C = xor uint %B, 15
+ %D = and uint %C, 1
+ ret uint %D
+}
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll
index e89009547b..0ffc8e1870 100644
--- a/test/Transforms/InstCombine/or.ll
+++ b/test/Transforms/InstCombine/or.ll
@@ -117,3 +117,15 @@ bool %test19(ubyte %A) {
%C = seteq ubyte %B, 34
ret bool %C
}
+
+
+bool %test20(int %A) {
+ %B = xor int %A, -1
+ %C = and int %B, 4
+ %D = setne int %C, 0
+ %E = and int %B, 123 ; Make the usecount of B = 2
+ %F = cast int %E to bool
+ %G = and bool %D, %F
+ ret bool %G
+}
+