brintos

brintos / llvm-project-archived public Read only

0
0
Text · 705 B · 49055e3 Raw
20 lines · plain
1; RUN: llc -mtriple=arm64-apple-ios7.0 %s -o - | FileCheck %s2; RUN: llc -mtriple=arm64-apple-ios7.0 -global-isel -global-isel-abort=1 -verify-machineinstrs %s -o - | FileCheck %s3 4@var = thread_local global i8 05 6; N.b. x0 must be the result of the first load (i.e. the address of the7; descriptor) when tlv_get_addr is called. Likewise the result is returned in8; x0.9define i8 @get_var() {10; CHECK-LABEL: get_var:11; CHECK: adrp x[[TLVPDESC_SLOT_HI:[0-9]+]], _var@TLVPPAGE12 ; CHECK: ldr x[[PTR:[0-9]+]], [x[[TLVPDESC_SLOT_HI]], _var@TLVPPAGEOFF]13 ; CHECK: ldr [[TLV_GET_ADDR:x[0-9]+]], [x[[PTR]]]14; CHECK: blr [[TLV_GET_ADDR]]15; CHECK: ldrb w0, [x0]16 17  %val = load i8, ptr @var, align 118  ret i8 %val19}20