xref: /aosp_15_r20/external/llvm/test/Transforms/StripSymbols/block-address.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt -strip -S < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker; PR10286
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker@main_addrs = constant [2 x i8*] [i8* blockaddress(@f, %FOO), i8* blockaddress(@f, %BAR)]
5*9880d681SAndroid Build Coastguard Worker; CHECK: @main_addrs = constant [2 x i8*] [i8* blockaddress(@f, %2), i8* blockaddress(@f, %3)]
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdeclare void @foo() nounwind
8*9880d681SAndroid Build Coastguard Workerdeclare void @bar() nounwind
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdefine void @f(i8* %indirect.goto.dest) nounwind uwtable ssp {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  indirectbr i8* %indirect.goto.dest, [label %FOO, label %BAR]
13*9880d681SAndroid Build Coastguard Worker
14*9880d681SAndroid Build Coastguard Worker  ; CHECK: indirectbr i8* %0, [label %2, label %3]
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard WorkerFOO:
17*9880d681SAndroid Build Coastguard Worker  call void @foo()
18*9880d681SAndroid Build Coastguard Worker  ret void
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard WorkerBAR:
21*9880d681SAndroid Build Coastguard Worker  call void @bar()
22*9880d681SAndroid Build Coastguard Worker  ret void
23*9880d681SAndroid Build Coastguard Worker}
24