summaryrefslogtreecommitdiff
path: root/test/Transforms/InstSimplify/compare.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstSimplify/compare.ll')
-rw-r--r--test/Transforms/InstSimplify/compare.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstSimplify/compare.ll b/test/Transforms/InstSimplify/compare.ll
index 57727c9ab7..df33122574 100644
--- a/test/Transforms/InstSimplify/compare.ll
+++ b/test/Transforms/InstSimplify/compare.ll
@@ -204,6 +204,15 @@ define i1 @select4(i1 %cond) {
; CHECK: ret i1 %cond
}
+define i1 @select5(i32 %x) {
+; CHECK: @select5
+ %c = icmp eq i32 %x, 0
+ %s = select i1 %c, i32 1, i32 %x
+ %c2 = icmp eq i32 %s, 0
+ ret i1 %c2
+; CHECK: ret i1 false
+}
+
define i1 @urem1(i32 %X, i32 %Y) {
; CHECK: @urem1
%A = urem i32 %X, %Y