1 ; RUN: opt -S -simplifycfg < %s | FileCheck %s 2 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 3 target triple = "x86_64-unknown-linux-gnu" 4 5 declare i32* @fn1(i32* returned) 6 7 define i32 @test1(i1 %B) { 8 entry: 9 br label %for.cond.us 10 11 for.cond.us: ; preds = %for.cond.us, %entry 12 br i1 %B, label %for.cond4.preheader, label %for.cond.us 13 14 for.cond4.preheader: ; preds = %for.cond.us 15 br i1 %B, label %for.cond4.preheader.split.us, label %for.cond4 16 17 for.cond4.preheader.split.us: ; preds = %for.cond4.preheader 18 unreachable 19 20 for.cond4: ; preds = %for.end, %for.cond4.preheader 21 %phi = phi i32* [ %call, %for.end ], [ undef, %for.cond4.preheader ] 22 %call = call i32* @fn1(i32* %phi) 23 br label %for.cond5 24 25 for.cond5: ; preds = %for.cond5, %for.cond4 26 br i1 %B, label %for.cond5, label %for.end 27 28 for.end: ; preds = %for.cond5 29 %load = load i32, i32* %call, align 4 30 br label %for.cond4 31 } 32 33 ; CHECK-LABEL: define i32 @test1( 34 ; CHECK: br label %[[LABEL:.*]] 35 ; CHECK: [[LABEL]]: 36 ; CHECK: br label %[[LABEL]] 37