aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/ConstProp/2003-05-12-DivideError.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/ConstProp/2003-05-12-DivideError.ll')
-rw-r--r--test/Transforms/ConstProp/2003-05-12-DivideError.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/Transforms/ConstProp/2003-05-12-DivideError.ll b/test/Transforms/ConstProp/2003-05-12-DivideError.ll
new file mode 100644
index 0000000..2708dce
--- /dev/null
+++ b/test/Transforms/ConstProp/2003-05-12-DivideError.ll
@@ -0,0 +1,15 @@
+; Make sure that the constant propagator doesn't cause a sigfpe
+;
+; RUN: opt < %s -constprop
+;
+
+define i32 @test() {
+ %R = sdiv i32 -2147483648, -1 ; <i32> [#uses=1]
+ ret i32 %R
+}
+
+define i32 @test2() {
+ %R = srem i32 -2147483648, -1 ; <i32> [#uses=1]
+ ret i32 %R
+}
+