1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=m68k -o - %s | FileCheck %s
4 @myvar = external thread_local global i32, align 4
6 define dso_local ptr @get_addr() nounwind {
7 ; CHECK-LABEL: get_addr:
8 ; CHECK: ; %bb.0: ; %entry
9 ; CHECK-NEXT: suba.l #4, %sp
10 ; CHECK-NEXT: jsr __m68k_read_tp
11 ; CHECK-NEXT: move.l %a0, %d0
12 ; CHECK-NEXT: lea (_GLOBAL_OFFSET_TABLE_@GOTPCREL,%pc), %a0
13 ; CHECK-NEXT: add.l (myvar@GOTTPOFF,%a0), %d0
14 ; CHECK-NEXT: move.l %d0, %a0
15 ; CHECK-NEXT: adda.l #4, %sp
19 %0 = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @myvar)
23 declare nonnull ptr @llvm.threadlocal.address.p0(ptr nonnull)