aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/2008-07-09-SubAndError.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine/2008-07-09-SubAndError.ll')
-rw-r--r--test/Transforms/InstCombine/2008-07-09-SubAndError.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/Transforms/InstCombine/2008-07-09-SubAndError.ll b/test/Transforms/InstCombine/2008-07-09-SubAndError.ll
new file mode 100644
index 0000000000..c5b93586ba
--- /dev/null
+++ b/test/Transforms/InstCombine/2008-07-09-SubAndError.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep {sub i32 0}
+; PR2330
+
+define i32 @foo(i32 %a) nounwind {
+entry:
+ %A = sub i32 5, %a
+ %B = and i32 %A, 2
+ ret i32 %B
+}