brintos

brintos / llvm-project-archived public Read only

0
0
Text · 474 B · c2a2040 Raw
20 lines · plain
1; This test shows a case where SCCP is incorrectly eliminating the PHI node2; because it thinks it has a constant 0 value, when it really doesn't.3 4; RUN: opt < %s -passes=sccp -S | grep phi5 6define i32 @test(i32 %A, i1 %c) {7bb1:8	br label %BB29BB2:		; preds = %BB4, %bb110	%V = phi i32 [ 0, %bb1 ], [ %A, %BB4 ]		; <i32> [#uses=1]11	br label %BB312BB3:		; preds = %BB213	br i1 %c, label %BB4, label %BB514BB4:		; preds = %BB315	br label %BB216BB5:		; preds = %BB317	ret i32 %V18}19 20