summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/div-cmp-overflow.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/div-cmp-overflow.ll')
-rw-r--r--test/Transforms/InstCombine/div-cmp-overflow.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/div-cmp-overflow.ll b/test/Transforms/InstCombine/div-cmp-overflow.ll
new file mode 100644
index 000000000000..9276c96479d7
--- /dev/null
+++ b/test/Transforms/InstCombine/div-cmp-overflow.ll
@@ -0,0 +1,8 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep sdiv
+; PR2740
+
+define i1 @func_75(i32 %i2) nounwind {
+ %i3 = sdiv i32 %i2, -1328634635
+ %i4 = icmp eq i32 %i3, -1
+ ret i1 %i4
+}