brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 7510f04 Raw
55 lines · plain
1; RUN: opt -passes=inline < %s -S | FileCheck %s2 3; CHECK-NOT: define4; CHECK: define void @e()5; CHECK-NOT: define6 7@b = external local_unnamed_addr global i32, align 48 9define void @e() local_unnamed_addr {10entry:11  call fastcc void @d()12  ret void13}14 15define internal fastcc void @f() unnamed_addr {16entry:17  call fastcc void @d()18  ret void19}20 21define internal fastcc void @d() unnamed_addr {22entry:23  br label %L24 25L:                                                ; preds = %cleanup9, %entry26  %cleanup.dest.slot.0 = phi i32 [ undef, %entry ], [ %cleanup.dest.slot.3, %cleanup9 ]27  store i32 0, ptr @b, align 428  %tobool.not = icmp eq i32 0, 029  br i1 %tobool.not, label %if.then, label %while.cond30 31while.cond:                                       ; preds = %cleanup9, %L32  %cleanup.dest.slot.2 = phi i32 [ %cleanup.dest.slot.0, %L ], [ 0, %cleanup9 ]33  %0 = load i32, ptr @b, align 434  %tobool3.not = icmp eq i32 %0, 035  br i1 %tobool3.not, label %cleanup9, label %while.body436 37while.body4:                                      ; preds = %while.cond38  call fastcc void @f()39  br label %cleanup940 41cleanup9:                                         ; preds = %while.cond, %while.body442  %cleanup.dest.slot.3 = phi i32 [ %cleanup.dest.slot.2, %while.body4 ], [ 0, %while.cond ]43  switch i32 %cleanup.dest.slot.3, label %common.ret [44    i32 0, label %while.cond45    i32 2, label %L46  ]47 48common.ret:                                       ; preds = %cleanup9, %if.then49  ret void50 51if.then:                                          ; preds = %L52  call void @e()53  br label %common.ret54}55