blob: 2708dce9852dc04285a4f9524079857c406e2a7a [file] [log] [blame]
Chris Lattner007c69d2003-05-12 15:18:53 +00001; Make sure that the constant propagator doesn't cause a sigfpe
2;
Dan Gohman18800922009-09-11 18:01:28 +00003; RUN: opt < %s -constprop
Chris Lattner007c69d2003-05-12 15:18:53 +00004;
5
Tanya Lattner5640bd12008-03-01 09:15:35 +00006define i32 @test() {
7 %R = sdiv i32 -2147483648, -1 ; <i32> [#uses=1]
8 ret i32 %R
Chris Lattner007c69d2003-05-12 15:18:53 +00009}
10
Tanya Lattner5640bd12008-03-01 09:15:35 +000011define i32 @test2() {
12 %R = srem i32 -2147483648, -1 ; <i32> [#uses=1]
13 ret i32 %R
Chris Lattner007c69d2003-05-12 15:18:53 +000014}
15