xref: /aosp_15_r20/external/llvm/test/Transforms/ConstProp/2002-05-03-DivideByZeroException.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1; Make sure that the constant propogator doesn't divide by zero!
2;
3; RUN: opt < %s -constprop
4;
5
6define i32 @test() {
7        %R = sdiv i32 12, 0             ; <i32> [#uses=1]
8        ret i32 %R
9}
10
11define i32 @test2() {
12        %R = srem i32 12, 0             ; <i32> [#uses=1]
13        ret i32 %R
14}
15
16