1; RUN: llc -mtriple=arm64-apple-ios7.0 %s -o - | FileCheck %s 2 3@var = thread_local global i8 0 4 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 7; x0. 8define i8 @get_var() { 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] 15 16 %val = load i8, i8* @var, align 1 17 ret i8 %val 18} 19