blob: 1a0845c52ac087aa7fd95c9c064527e33d907b6d [file] [log] [blame]
Chris Lattner8a2e64c2002-05-03 20:25:40 +00001; Make sure that the constant propogator doesn't divide by zero!
2;
Tanya Lattnerec9a35a2008-03-01 09:15:35 +00003; RUN: llvm-as < %s | opt -constprop
Chris Lattner8a2e64c2002-05-03 20:25:40 +00004;
5
Tanya Lattnerec9a35a2008-03-01 09:15:35 +00006define i32 @test() {
7 %R = sdiv i32 12, 0 ; <i32> [#uses=1]
8 ret i32 %R
Chris Lattner8a2e64c2002-05-03 20:25:40 +00009}
10
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000011define i32 @test2() {
12 %R = srem i32 12, 0 ; <i32> [#uses=1]
13 ret i32 %R
Chris Lattner8a2e64c2002-05-03 20:25:40 +000014}
Tanya Lattnerec9a35a2008-03-01 09:15:35 +000015