aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 0000000000..b634812abe
--- /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: as < %s | opt -constprop
+;
+
+int "test"() {
+ %R = div int -2147483648, -1
+ ret int %R
+}
+
+int "test2"() {
+ %R = rem int -2147483648, -1
+ ret int %R
+}
+