1 ; RUN: llc -fast-isel-sink-local-values -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=3 -mcpu=mips32r2 \
2 ; RUN: < %s | FileCheck %s
3 ; RUN: llc -fast-isel-sink-local-values -march=mipsel -relocation-model=pic -O0 -fast-isel-abort=3 -mcpu=mips32 \
4 ; RUN: < %s | FileCheck %s
6 @ijk = external global i32
8 ; Function Attrs: nounwind
9 define void @si2_1() #0 {
11 store i32 32767, i32* @ijk, align 4
13 ; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}})
14 ; CHECK: addiu $[[REG1:[0-9]+]], $zero, 32767
15 ; CHECK: sw $[[REG1]], 0($[[REG2]])
20 ; Function Attrs: nounwind
21 define void @si2_2() #0 {
23 store i32 -32768, i32* @ijk, align 4
25 ; CHECK: lui $[[REG1:[0-9]+]], 65535
26 ; CHECK: ori $[[REG2:[0-9]+]], $[[REG1]], 32768
27 ; CHECK: lw $[[REG3:[0-9]+]], %got(ijk)(${{[0-9]+}})
28 ; CHECK: sw $[[REG2]], 0($[[REG3]])
32 ; Function Attrs: nounwind
33 define void @ui2_1() #0 {
35 store i32 65535, i32* @ijk, align 4
37 ; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}})
38 ; CHECK: ori $[[REG1:[0-9]+]], $zero, 65535
39 ; CHECK: sw $[[REG1]], 0($[[REG2]])
43 ; Function Attrs: nounwind
44 define void @ui4_1() #0 {
46 store i32 983040, i32* @ijk, align 4
48 ; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}})
49 ; CHECK: lui $[[REG1:[0-9]+]], 15
50 ; CHECK: sw $[[REG1]], 0($[[REG2]])
54 ; Function Attrs: nounwind
55 define void @ui4_2() #0 {
57 store i32 719566, i32* @ijk, align 4
59 ; CHECK: lui $[[REG1:[0-9]+]], 10
60 ; CHECK: ori $[[REG1]], $[[REG1]], 64206
61 ; CHECK: lw $[[REG2:[0-9]+]], %got(ijk)(${{[0-9]+}})
62 ; CHECK: sw $[[REG1]], 0($[[REG2]])
66 attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }