summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/InstCombine/icmp.ll10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/icmp.ll b/test/Transforms/InstCombine/icmp.ll
index 2e3ff24f6b..63fefc0877 100644
--- a/test/Transforms/InstCombine/icmp.ll
+++ b/test/Transforms/InstCombine/icmp.ll
@@ -1409,3 +1409,13 @@ entry:
%conv = zext i1 %cmp to i32
ret i32 %conv
}
+
+; CHECK-LABEL: icmp_add_const_ult
+; CHECK: %cmp = icmp ult i32 %add, 6
+define i32 @icmp_add_const_ult(i32 %a) #0 {
+entry:
+ %add = add nsw i32 %a, -49
+ %cmp = icmp ult i32 %add, 6
+ %conv = zext i1 %cmp to i32
+ ret i32 %conv
+}