llvm.org GIT mirror llvm / 82de2e1
Add a test for PR4413, which was apparently fixed at some point in the past. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112987 91177308-0d34-0410-b5e6-96231b3b80d8 Owen Anderson 9 years ago
1 changed file(s) with 21 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
401401 store i32 %tmp5, i32* %res
402402 br label %if.end
403403 }
404
405 ; PR4413
406 declare i32 @ext()
407 ; CHECK: @test17
408 define i32 @test17(i1 %a) {
409 entry:
410 br i1 %a, label %bb1, label %bb2
411
412 bb1: ; preds = %entry
413 %0 = tail call i32 @ext() ; [#uses=1]
414 br label %bb2
415
416 bb2: ; preds = %bb1, %entry
417 %cond = phi i1 [ true, %bb1 ], [ false, %entry ] ; [#uses=1]
418 ; CHECK-NOT: %val = phi i32 [ %0, %bb1 ], [ 0, %entry ]
419 %val = phi i32 [ %0, %bb1 ], [ 0, %entry ] ; [#uses=1]
420 %res = select i1 %cond, i32 %val, i32 0 ; [#uses=1]
421 ; CHECK: ret i32 %cond
422 ret i32 %res
423 }
424