1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=i386-apple-darwin -relocation-model=pic | FileCheck %s
4 @main_q = internal global ptr null ; <ptr> [#uses=1]
6 define void @func2() nounwind {
8 ; CHECK: ## %bb.0: ## %entry
9 ; CHECK-NEXT: calll L0$pb
11 ; CHECK-NEXT: popl %eax
12 ; CHECK-NEXT: leal _main_q-L0$pb(%eax), %eax
13 ; CHECK-NEXT: ## InlineAsm Start
14 ; CHECK-NEXT: movl %eax, %gs:152
15 ; CHECK-NEXT: ## InlineAsm End
18 tail call void asm "mov $1,%gs:$0", "=*m,ri,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(ptr) inttoptr (i32 152 to ptr), ptr @main_q) nounwind
22 ; The intent of this test is to ensure that we handle blockaddress' correctly
23 ; with "i" constraints for -m32 -fPIC.
28 ; CHECK-NEXT: ## InlineAsm Start
29 ; CHECK-NEXT: ## LBB1_1
31 ; CHECK-NEXT: ## InlineAsm End
32 ; CHECK-NEXT: ## %bb.2: ## %return
34 ; CHECK-NEXT: Ltmp0: ## Block address taken
35 ; CHECK-NEXT: LBB1_1: ## %overflow
36 ; CHECK-NEXT: ## Label of block must be emitted
38 callbr void asm "# ${0:l}\0A", "!i"()
39 to label %return [label %overflow]
48 ; Test unusual case of blockaddress from @x in @y's asm.
52 ; CHECK-NEXT: ## InlineAsm Start
53 ; CHECK-NEXT: ## Ltmp0
55 ; CHECK-NEXT: ## InlineAsm End
57 call void asm "# ${0:l}\0A", "i"(ptr blockaddress(@x, %overflow))