1 ; RUN: llc -march=mips -mattr=+dsp < %s -asm-show-inst -O0 | FileCheck %s \
2 ; RUN: --check-prefixes=ASM,ALL
3 ; RUN: llc -march=mips -mattr=+dsp,+micromips < %s -O0 -filetype=obj | \
4 ; RUN: llvm-objdump -d - | FileCheck %s --check-prefixes=MM-OBJ,ALL
6 ; Test that spill and reloads use the dsp "variant" instructions. We use -O0
7 ; to use the simple register allocator.
9 ; To test the micromips output, we have to take a round trip through the
10 ; object file encoder/decoder as the instruction mapping tables are used to
13 ; FIXME: We should be able to get rid of those instructions with the variable
16 ; ALL-LABEL: spill_reload:
18 define <4 x i8> @spill_reload(<4 x i8> %a, <4 x i8> %b, i32 %g) {
20 %c = tail call <4 x i8> @llvm.mips.addu.qb(<4 x i8> %a, <4 x i8> %b)
21 %cond = icmp eq i32 %g, 0
22 br i1 %cond, label %true, label %end
27 ; MM-OBJ: sw ${{[0-9]+}}, {{[0-9]+}}($sp)
28 ; MM-OBJ: sw ${{[0-9]+}}, {{[0-9]+}}($sp)
35 ; MM-OBJ: lw ${{[0-9]+}}, {{[0-9]+}}($sp)
38 %d = tail call <4 x i8> @llvm.mips.addu.qb(<4 x i8> %c, <4 x i8> %a)
44 ; MM-OBJ: lw ${{[0-9]+}}, {{[0-9]+}}($sp)
45 ; MM-OBJ: lw ${{[0-9]+}}, {{[0-9]+}}($sp)
49 declare <4 x i8> @llvm.mips.addu.qb(<4 x i8>, <4 x i8>) nounwind