1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32FP32
3 # RUN: llc -O0 -mtriple=mipsel-linux-gnu -mattr=+fp64,+mips32r2 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32FP64
6 define void @store_i32(i32* %ptr) { entry: ret void }
7 define void @store_float(float* %ptr) { entry: ret void }
8 define void @store_double(double* %ptr) { entry: ret void }
16 tracksRegLiveness: true
21 ; MIPS32FP32-LABEL: name: store_i32
22 ; MIPS32FP32: liveins: $a0, $a1
23 ; MIPS32FP32: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
24 ; MIPS32FP32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
25 ; MIPS32FP32: SW [[COPY]], [[COPY1]], 0 :: (store 4 into %ir.ptr)
27 ; MIPS32FP64-LABEL: name: store_i32
28 ; MIPS32FP64: liveins: $a0, $a1
29 ; MIPS32FP64: [[COPY:%[0-9]+]]:gpr32 = COPY $a0
30 ; MIPS32FP64: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
31 ; MIPS32FP64: SW [[COPY]], [[COPY1]], 0 :: (store 4 into %ir.ptr)
33 %0:gprb(s32) = COPY $a0
34 %1:gprb(p0) = COPY $a1
35 G_STORE %0(s32), %1(p0) :: (store 4 into %ir.ptr)
44 tracksRegLiveness: true
49 ; MIPS32FP32-LABEL: name: store_float
50 ; MIPS32FP32: liveins: $a1, $f12
51 ; MIPS32FP32: [[COPY:%[0-9]+]]:fgr32 = COPY $f12
52 ; MIPS32FP32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
53 ; MIPS32FP32: SWC1 [[COPY]], [[COPY1]], 0 :: (store 4 into %ir.ptr)
55 ; MIPS32FP64-LABEL: name: store_float
56 ; MIPS32FP64: liveins: $a1, $f12
57 ; MIPS32FP64: [[COPY:%[0-9]+]]:fgr32 = COPY $f12
58 ; MIPS32FP64: [[COPY1:%[0-9]+]]:gpr32 = COPY $a1
59 ; MIPS32FP64: SWC1 [[COPY]], [[COPY1]], 0 :: (store 4 into %ir.ptr)
61 %0:fprb(s32) = COPY $f12
62 %1:gprb(p0) = COPY $a1
63 G_STORE %0(s32), %1(p0) :: (store 4 into %ir.ptr)
72 tracksRegLiveness: true
77 ; MIPS32FP32-LABEL: name: store_double
78 ; MIPS32FP32: liveins: $a2, $d6
79 ; MIPS32FP32: [[COPY:%[0-9]+]]:afgr64 = COPY $d6
80 ; MIPS32FP32: [[COPY1:%[0-9]+]]:gpr32 = COPY $a2
81 ; MIPS32FP32: SDC1 [[COPY]], [[COPY1]], 0 :: (store 8 into %ir.ptr)
83 ; MIPS32FP64-LABEL: name: store_double
84 ; MIPS32FP64: liveins: $a2, $d6
85 ; MIPS32FP64: [[COPY:%[0-9]+]]:fgr64 = COPY $d6
86 ; MIPS32FP64: [[COPY1:%[0-9]+]]:gpr32 = COPY $a2
87 ; MIPS32FP64: SDC164 [[COPY]], [[COPY1]], 0 :: (store 8 into %ir.ptr)
89 %0:fprb(s64) = COPY $d6
90 %1:gprb(p0) = COPY $a2
91 G_STORE %0(s64), %1(p0) :: (store 8 into %ir.ptr)