xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/Fast-ISel/constexpr-address.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -mcpu=mips32 -relocation-model=pic \
2*9880d681SAndroid Build Coastguard Worker; RUN:     -fast-isel=true -fast-isel-abort=1 < %s | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -mcpu=mips32r2 -relocation-model=pic \
4*9880d681SAndroid Build Coastguard Worker; RUN:     -fast-isel=true -fast-isel-abort=1 < %s | FileCheck %s
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker@ARR = external global [10 x i32], align 4
7*9880d681SAndroid Build Coastguard Worker
8*9880d681SAndroid Build Coastguard Workerdefine void @foo() {
9*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: foo
10*9880d681SAndroid Build Coastguard Worker
11*9880d681SAndroid Build Coastguard Worker; CHECK-DAG:    lw      $[[ARR:[0-9]+]], %got(ARR)({{.*}})
12*9880d681SAndroid Build Coastguard Worker; CHECK-DAG:    addiu   $[[T0:[0-9]+]], $zero, 12345
13*9880d681SAndroid Build Coastguard Worker; CHECK:        sw      $[[T0]], 8($[[ARR]])
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Workerentry:
16*9880d681SAndroid Build Coastguard Worker  store i32 12345, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @ARR, i32 0, i32 2), align 4
17*9880d681SAndroid Build Coastguard Worker  ret void
18*9880d681SAndroid Build Coastguard Worker}
19