xref: /aosp_15_r20/external/llvm/test/CodeGen/AArch64/breg.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -verify-machineinstrs -o - %s -mtriple=aarch64-linux-gnu -aarch64-atomic-cfg-tidy=0 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@stored_label = global i8* null
4*9880d681SAndroid Build Coastguard Worker
5*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
6*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: foo:
7*9880d681SAndroid Build Coastguard Worker  %lab = load i8*, i8** @stored_label
8*9880d681SAndroid Build Coastguard Worker  indirectbr i8* %lab, [label  %otherlab, label %retlab]
9*9880d681SAndroid Build Coastguard Worker; CHECK: adrp {{x[0-9]+}}, stored_label
10*9880d681SAndroid Build Coastguard Worker; CHECK: ldr {{x[0-9]+}}, [{{x[0-9]+}}, {{#?}}:lo12:stored_label]
11*9880d681SAndroid Build Coastguard Worker; CHECK: br {{x[0-9]+}}
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Workerotherlab:
14*9880d681SAndroid Build Coastguard Worker  ret void
15*9880d681SAndroid Build Coastguard Workerretlab:
16*9880d681SAndroid Build Coastguard Worker  ret void
17*9880d681SAndroid Build Coastguard Worker}
18