1; RUN: llc < %s -mtriple=x86_64-apple-darwin | FileCheck %s 2 3; Test that we don't drop a block that has its address taken. 4 5; CHECK: Ltmp0: ## Block address taken 6; CHECK: Ltmp1: ## Block address taken 7 8@a = common global i32 0, align 4 9@p = common global i8* null, align 8 10 11define void @foo() noreturn nounwind uwtable ssp { 12entry: 13 %tmp = load i32, i32* @a, align 4 14 %foo = icmp eq i32 0, %tmp 15 br i1 %foo, label %sw.bb, label %sw.default 16 17sw.bb: ; preds = %entry 18 store i8* blockaddress(@foo, %sw.bb1), i8** @p, align 8 19 br label %sw.bb1 20 21sw.bb1: ; preds = %sw.default, %sw.bb, %entry 22 store i8* blockaddress(@foo, %sw.default), i8** @p, align 8 23 br label %sw.default 24 25sw.default: ; preds = %sw.bb1, %entry 26 store i8* blockaddress(@foo, %sw.bb1), i8** @p, align 8 27 br label %sw.bb1 28} 29