summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/or.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/or.ll')
-rw-r--r--test/Transforms/InstCombine/or.ll13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/or.ll b/test/Transforms/InstCombine/or.ll
index 43ed83d618..4165c52a6a 100644
--- a/test/Transforms/InstCombine/or.ll
+++ b/test/Transforms/InstCombine/or.ll
@@ -100,3 +100,16 @@ bool %test15(uint %A, uint %B) {
ret bool %D
}
+int %test16(int %A) {
+ %B = and int %A, 1
+ %C = and int %A, -2 ; -2 = ~1
+ %D = or int %B, %C ; %D = and int %B, -1 == %B
+ ret int %D
+}
+
+int %test17(int %A) {
+ %B = and int %A, 1
+ %C = and int %A, 4
+ %D = or int %B, %C ; %D = and int %B, 5
+ ret int %D
+}