blob: 15a6211893826ccbe134e613fcc9e180beff8a19 [file] [log] [blame]
Chris Lattner8a2e64c2002-05-03 20:25:40 +00001; Make sure that the constant propogator doesn't divide by zero!
2;
Dan Gohmanf2f6ce62009-09-11 18:01:28 +00003; RUN: opt < %s -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