xref: /llvm-project/llvm/test/Transforms/InstSimplify/ConstProp/2003-05-12-DivideError.ll (revision b280ee1dd7e9b36ae7aaa3953556e4b7a7f31a29)
1; Make sure that the constant propagator doesn't cause a sigfpe
2;
3; RUN: opt < %s -passes=instsimplify
4;
5
6define i32 @test() {
7        %R = sdiv i32 -2147483648, -1           ; <i32> [#uses=1]
8        ret i32 %R
9}
10
11define i32 @test2() {
12        %R = srem i32 -2147483648, -1           ; <i32> [#uses=1]
13        ret i32 %R
14}
15
16