1 ; RUN: llc -mtriple armv7---eabi -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-SHORT
2 ; RUN: llc -mtriple thumbv7---eabi -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-SHORT
3 ; RUN: llc -mtriple armv7---eabi -mattr=+long-calls -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-LONG
4 ; RUN: llc -mtriple thumbv7---eabi -mattr=+long-calls -filetype asm -o - %s | FileCheck %s -check-prefix CHECK -check-prefix CHECK-LONG
6 @i = dso_local thread_local local_unnamed_addr global i32 0, align 4
8 define dso_local i32 @f() local_unnamed_addr {
10 %0 = load i32, ptr @i, align 4
15 ; CHECK-SHORT: ldr r1, [[VAR:.LCPI[0-9]+_[0-9]+]]
16 ; CHECK-SHORT-NEXT: bl __aeabi_read_tp
17 ; CHECK-SHORT: [[VAR]]:
18 ; CHECK-SHORT-NEXT: .long i(TPOFF)
20 ; CHECK-LONG: ldr [[REG:r[0-9]+]], [[FUN:.LCPI[0-9]+_[0-9]+]]
21 ; CHECK-LONG-NEXT: ldr r1, [[VAR:.LCPI[0-9]+_[0-9]+]]
22 ; CHECK-LONG-NEXT: blx [[REG]]
23 ; CHECK-LONG: [[VAR]]:
24 ; CHECK-LONG-NEXT: .long i(TPOFF)
25 ; CHECK-LONG: [[FUN]]:
26 ; CHECK-LONG-NEXT: .long __aeabi_read_tp