xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/private-addr.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mtriple=mips-pc-linux -relocation-model=pic < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Workerdefine private void @bar() {
4*9880d681SAndroid Build Coastguard Worker  ret void
5*9880d681SAndroid Build Coastguard Worker}
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Workerdefine void()* @foo() {
8*9880d681SAndroid Build Coastguard Worker; CHECK:      foo:
9*9880d681SAndroid Build Coastguard Worker; CHECK:      lw     $[[REG:.*]], %got($bar)($1)
10*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: jr     $ra
11*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: addiu  $2, $[[REG]], %lo($bar)
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker  ret void()* @bar
14*9880d681SAndroid Build Coastguard Worker}
15