; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc --mtriple=xtensa < %s | FileCheck %s
@addr = global ptr null
define void @test_blockaddress() {
; CHECK-LABEL: test_blockaddress:
; CHECK: l32r a8, .LCPI0_0
; CHECK-NEXT: l32r a9, .LCPI0_1
; CHECK-NEXT: memw
; CHECK-NEXT: s32i a9, a8, 0
; CHECK-NEXT: memw
; CHECK-NEXT: l32i a8, a8, 0
; CHECK-NEXT: jx a8
; CHECK-NEXT: .Ltmp0: # Block address taken
; CHECK-NEXT: .LBB0_1: # %block
; CHECK-NEXT: ret
store volatile ptr blockaddress(@test_blockaddress, %block), ptr @addr
%val = load volatile ptr, ptr @addr
indirectbr ptr %val, [label %block]
block:
ret void
}