• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=arm64_32-apple-ios %s -o - | FileCheck %s
2
3define i32 @test_thread_local() {
4; CHECK-LABEL: test_thread_local:
5; CHECK: adrp x[[TMP:[0-9]+]], _var@TLVPPAGE
6; CHECK: ldr w0, [x[[TMP]], _var@TLVPPAGEOFF]
7; CHECK: ldr w[[DEST:[0-9]+]], [x0]
8; CHECK: blr x[[DEST]]
9
10  %val = load i32, i32* @var
11  ret i32 %val
12}
13
14@var = thread_local global i32 zeroinitializer
15
16; CHECK: .tbss _var$tlv$init, 4, 2
17
18; CHECK-LABEL: __DATA,__thread_vars
19; CHECK: _var:
20; CHECK:    .long __tlv_bootstrap
21; CHECK:    .long 0
22; CHECK:    .long _var$tlv$init
23