1*9880d681SAndroid Build Coastguard Worker; RUN: opt -globaldce -simplifycfg -S < %s | FileCheck %s 2*9880d681SAndroid Build Coastguard Worker 3*9880d681SAndroid Build Coastguard Worker; Tests whether globaldce does the right cleanup while removing @bar 4*9880d681SAndroid Build Coastguard Worker; so that a dead BlockAddress reference to foo won't prevent other passes 5*9880d681SAndroid Build Coastguard Worker; to work properly, e.g. simplifycfg 6*9880d681SAndroid Build Coastguard Worker@bar = internal unnamed_addr constant i8* blockaddress(@foo, %L1) 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: foo 9*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: br label %L1 10*9880d681SAndroid Build Coastguard Worker; CHECK: ret void 11*9880d681SAndroid Build Coastguard Workerdefine void @foo() { 12*9880d681SAndroid Build Coastguard Workerentry: 13*9880d681SAndroid Build Coastguard Worker br label %L1 14*9880d681SAndroid Build Coastguard WorkerL1: 15*9880d681SAndroid Build Coastguard Worker ret void 16*9880d681SAndroid Build Coastguard Worker} 17