1; RUN: llc -mtriple=aarch64-none-linux-gnu -aarch64-enable-atomic-cfg-tidy=0 -verify-machineinstrs < %s | FileCheck %s 2; RUN: llc -code-model=large -mtriple=aarch64-none-linux-gnu -aarch64-enable-atomic-cfg-tidy=0 -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-LARGE %s 3; RUN: llc -code-model=tiny -mtriple=aarch64-none-none-eabi -aarch64-enable-atomic-cfg-tidy=0 -verify-machineinstrs < %s | FileCheck --check-prefix=CHECK-TINY %s 4 5@addr = global i8* null 6 7define void @test_blockaddress() { 8; CHECK-LABEL: test_blockaddress: 9 store volatile i8* blockaddress(@test_blockaddress, %block), i8** @addr 10 %val = load volatile i8*, i8** @addr 11 indirectbr i8* %val, [label %block] 12; CHECK: adrp [[DEST_HI:x[0-9]+]], [[DEST_LBL:.Ltmp[0-9]+]] 13; CHECK: add [[DEST:x[0-9]+]], [[DEST_HI]], {{#?}}:lo12:[[DEST_LBL]] 14; CHECK: str [[DEST]], 15; CHECK: ldr [[NEWDEST:x[0-9]+]] 16; CHECK: br [[NEWDEST]] 17 18; CHECK-LARGE: movz [[ADDR_REG:x[0-9]+]], #:abs_g0_nc:[[DEST_LBL:.Ltmp[0-9]+]] 19; CHECK-LARGE: movk [[ADDR_REG]], #:abs_g1_nc:[[DEST_LBL]] 20; CHECK-LARGE: movk [[ADDR_REG]], #:abs_g2_nc:[[DEST_LBL]] 21; CHECK-LARGE: movk [[ADDR_REG]], #:abs_g3:[[DEST_LBL]] 22; CHECK-LARGE: str [[ADDR_REG]], 23; CHECK-LARGE: ldr [[NEWDEST:x[0-9]+]] 24; CHECK-LARGE: br [[NEWDEST]] 25 26; CHECK-TINY: adr [[DEST:x[0-9]+]], {{.Ltmp[0-9]+}} 27; CHECK-TINY: str [[DEST]], 28; CHECK-TINY: ldr [[NEWDEST:x[0-9]+]] 29; CHECK-TINY: br [[NEWDEST]] 30 31block: 32 ret void 33} 34