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