1 ; RUN: llc -mtriple=arm64-apple-ios7.0 %s -o - | FileCheck %s
3 @var = thread_local global i8 0
5 ; N.b. x0 must be the result of the first load (i.e. the address of the
6 ; descriptor) when tlv_get_addr is called. Likewise the result is returned in
9 ; CHECK-LABEL: get_var:
10 ; CHECK: adrp x[[TLVPDESC_SLOT_HI:[0-9]+]], _var@TLVPPAGE
11 ; CHECK: ldr x0, [x[[TLVPDESC_SLOT_HI]], _var@TLVPPAGEOFF]
12 ; CHECK: ldr [[TLV_GET_ADDR:x[0-9]+]], [x0]
13 ; CHECK: blr [[TLV_GET_ADDR]]
14 ; CHECK: ldrb w0, [x0]
16 %val = load i8, i8* @var, align 1