aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/InstCombine/2008-07-11-RemAnd.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/2008-07-11-RemAnd.ll')
-rw-r--r--test/Transforms/InstCombine/2008-07-11-RemAnd.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-07-11-RemAnd.ll b/test/Transforms/InstCombine/2008-07-11-RemAnd.ll
new file mode 100644
index 0000000..bf53451
--- /dev/null
+++ b/test/Transforms/InstCombine/2008-07-11-RemAnd.ll
@@ -0,0 +1,9 @@
+; RUN: opt < %s -instcombine -S | not grep rem
+; PR2330
+
+define i32 @a(i32 %b) nounwind {
+entry:
+ srem i32 %b, 8 ; <i32>:0 [#uses=1]
+ and i32 %0, 1 ; <i32>:1 [#uses=1]
+ ret i32 %1
+}