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