brintos

brintos / llvm-project-archived public Read only

0
0
Text · 683 B · baead27 Raw
39 lines · plain
1; RUN: opt < %s -passes=lcssa -S | FileCheck %s2; CHECK: exit1:3; CHECK: .lcssa =4; CHECK: exit2:5; CHECK: .lcssa1 =6; CHECK: exit3:7; CHECK-NOT: .lcssa8 9; Test to ensure that when there are multiple exit blocks, PHI nodes are10; only inserted by LCSSA when there is a use dominated by a given exit11; block.12 13declare void @printf(i32 %i)14 15define i32 @unused_phis(i1 %arg) nounwind {16entry:17  br label %loop18 19loop:20  %i = phi i32 [0, %entry], [1, %then2]21  br i1 %arg, label %exit1, label %then122 23then1:24  br i1 %arg, label %exit2, label %then225 26then2:27  br i1 %arg, label %exit3, label %loop28 29exit1:30  call void @printf(i32 %i)31  ret i32 %i32 33exit2:34  ret i32 %i35 36exit3:37  ret i32 038}39