blob: 15a6211893826ccbe134e613fcc9e180beff8a19 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; Make sure that the constant propogator doesn't divide by zero!
2;
Dan Gohman3c7d3082009-09-11 18:01:28 +00003; RUN: opt < %s -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