1 ;RUN: llc -mtriple=aarch64-none-linux-gnu -mattr=+neon < %s | FileCheck %s
3 @a = external global [2 x [2 x i32]], align 4
5 define void @test_inline_constraint_S() {
6 ; CHECK-LABEL: test_inline_constraint_S:
7 call void asm sideeffect "adrp x0, $0", "S"(ptr @var)
8 call void asm sideeffect "add x0, x0, :lo12:$0", "S"(ptr @var)
9 call void asm sideeffect "// $0", "S"(ptr getelementptr inbounds ([2 x [2 x i32]], ptr @a, i64 0, i64 1, i64 1))
11 ; CHECK: add x0, x0, :lo12:var
15 define i32 @test_inline_constraint_S_label(i1 %in) {
16 ; CHECK-LABEL: test_inline_constraint_S_label:
17 call void asm sideeffect "adr x0, $0", "S"(ptr blockaddress(@test_inline_constraint_S_label, %loc))
18 ; CHECK: adr x0, .Ltmp{{[0-9]+}}
19 br i1 %in, label %loc, label %loc2
25 define i32 @test_inline_constraint_S_label_tailmerged(i1 %in) {
26 ; CHECK-LABEL: test_inline_constraint_S_label_tailmerged:
27 call void asm sideeffect "adr x0, $0", "S"(ptr blockaddress(@test_inline_constraint_S_label_tailmerged, %loc))
28 ; CHECK: adr x0, .Ltmp{{[0-9]+}}
29 br i1 %in, label %loc, label %loc2
35 %common.retval = phi i32 [ 0, %loc ], [ 42, %loc2 ]
36 ret i32 %common.retval
39 define i32 @test_inline_constraint_S_label_tailmerged2(i1 %in) {
40 ; CHECK-LABEL: test_inline_constraint_S_label_tailmerged2:
41 call void asm sideeffect "adr x0, $0", "S"(ptr blockaddress(@test_inline_constraint_S_label_tailmerged2, %loc))
42 ; CHECK: adr x0, .Ltmp{{[0-9]+}}
43 br i1 %in, label %loc, label %loc2
45 %common.retval = phi i32 [ 0, %loc ], [ 42, %loc2 ]
46 ret i32 %common.retval