1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \ 3; RUN: | FileCheck %s -check-prefix=RV32I 4 5@addr = global i8* null 6 7define void @test_blockaddress() nounwind { 8; RV32I-LABEL: test_blockaddress: 9; RV32I: # %bb.0: 10; RV32I-NEXT: addi sp, sp, -16 11; RV32I-NEXT: sw ra, 12(sp) 12; RV32I-NEXT: lui a0, %hi(.Ltmp0) 13; RV32I-NEXT: addi a0, a0, %lo(.Ltmp0) 14; RV32I-NEXT: lui a1, %hi(addr) 15; RV32I-NEXT: sw a0, %lo(addr)(a1) 16; RV32I-NEXT: lw a0, %lo(addr)(a1) 17; RV32I-NEXT: jr a0 18; RV32I-NEXT: .Ltmp0: # Block address taken 19; RV32I-NEXT: .LBB0_1: # %block 20; RV32I-NEXT: lw ra, 12(sp) 21; RV32I-NEXT: addi sp, sp, 16 22; RV32I-NEXT: ret 23 store volatile i8* blockaddress(@test_blockaddress, %block), i8** @addr 24 %val = load volatile i8*, i8** @addr 25 indirectbr i8* %val, [label %block] 26 27block: 28 ret void 29} 30