blob: 5d25ff13525e5a95da9c390d42fa1719c1ef3081 [file] [log] [blame]
Dan Gohmanf17a25c2007-07-18 16:29:46 +00001; This testcase is a distilled form of: 2002-05-28-Crash.ll
2
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00003; RUN: llvm-as < %s | opt -adce
Dan Gohmanf17a25c2007-07-18 16:29:46 +00004
Tanya Lattner4c4d0b82008-03-01 09:15:35 +00005define float @test(i32 %i) {
6 %F = sitofp i32 %i to float ; <float> [#uses=1]
7 %I = bitcast i32 %i to i32 ; <i32> [#uses=1]
8 br label %Loop
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000010Loop: ; preds = %Loop, %0
11 %B = icmp ne i32 %I, 0 ; <i1> [#uses=1]
12 br i1 %B, label %Out, label %Loop
Dan Gohmanf17a25c2007-07-18 16:29:46 +000013
Tanya Lattner4c4d0b82008-03-01 09:15:35 +000014Out: ; preds = %Loop
15 ret float %F
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016}
17