1 ; RUN: opt < %s -lcssa -S | FileCheck %s
2 ; RUN: opt < %s -passes=lcssa -S | FileCheck %s
10 ; Test to ensure that when there are multiple exit blocks, PHI nodes are
11 ; only inserted by LCSSA when there is a use dominated by a given exit
14 declare void @printf(i32 %i)
16 define i32 @unused_phis() nounwind {
21 %i = phi i32 [0, %entry], [1, %then2]
22 br i1 undef, label %exit1, label %then1
25 br i1 undef, label %exit2, label %then2
28 br i1 undef, label %exit3, label %loop
31 call void @printf(i32 %i)