xref: /aosp_15_r20/external/llvm/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=1 -mcpu=mips32r2 \
2*9880d681SAndroid Build Coastguard Worker; RUN:     < %s | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker; RUN: llc -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=1 -mcpu=mips32 \
4*9880d681SAndroid Build Coastguard Worker; RUN:     < %s | FileCheck %s
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker@.str = private unnamed_addr constant [6 x i8] c"hello\00", align 1
7*9880d681SAndroid Build Coastguard Worker@s = common global i8* null, align 4
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker; Function Attrs: nounwind
10*9880d681SAndroid Build Coastguard Workerdefine void @foo() #0 {
11*9880d681SAndroid Build Coastguard Workerentry:
12*9880d681SAndroid Build Coastguard Worker  store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0), i8** @s, align 4
13*9880d681SAndroid Build Coastguard Worker  ret void
14*9880d681SAndroid Build Coastguard Worker; CHECK:        .ent    foo
15*9880d681SAndroid Build Coastguard Worker; CHECK:        lw      $[[REG1:[0-9]+]], %got($.str)(${{[0-9]+}})
16*9880d681SAndroid Build Coastguard Worker; CHECK:        addiu   ${{[0-9]+}}, $[[REG1]], %lo($.str)
17*9880d681SAndroid Build Coastguard Worker
18*9880d681SAndroid Build Coastguard Worker}
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Workerattributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="false" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
21*9880d681SAndroid Build Coastguard Worker
22