2003-05-12 23:18:53 +08:00
|
|
|
; Make sure that the constant propagator doesn't cause a sigfpe
|
|
|
|
;
|
2008-03-01 17:15:35 +08:00
|
|
|
; RUN: llvm-as < %s | opt -constprop
|
2003-05-12 23:18:53 +08:00
|
|
|
;
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define i32 @test() {
|
|
|
|
%R = sdiv i32 -2147483648, -1 ; <i32> [#uses=1]
|
|
|
|
ret i32 %R
|
2003-05-12 23:18:53 +08:00
|
|
|
}
|
|
|
|
|
2008-03-01 17:15:35 +08:00
|
|
|
define i32 @test2() {
|
|
|
|
%R = srem i32 -2147483648, -1 ; <i32> [#uses=1]
|
|
|
|
ret i32 %R
|
2003-05-12 23:18:53 +08:00
|
|
|
}
|
|
|
|
|