aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll')
-rw-r--r--test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll b/test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll
new file mode 100644
index 0000000..aa077e2
--- /dev/null
+++ b/test/Transforms/InstCombine/2008-11-01-SRemDemandedBits.ll
@@ -0,0 +1,8 @@
+; RUN: opt < %s -instcombine -S | grep {ret i1 true}
+; PR2993
+
+define i1 @foo(i32 %x) {
+ %1 = srem i32 %x, -1
+ %2 = icmp eq i32 %1, 0
+ ret i1 %2
+}