1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -O0 -mtriple=mipsel-linux-gnu -run-pass=regbankselect -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
3--- |
4
5  define void @store_i32(i32* %ptr) { entry: ret void }
6  define void @store_i64(i64* %ptr) { entry: ret void }
7  define void @store_float(float* %ptr) { entry: ret void }
8  define void @store_double(double* %ptr) { entry: ret void }
9
10...
11---
12name:            store_i32
13alignment:       4
14legalized:       true
15tracksRegLiveness: true
16body:             |
17  bb.1.entry:
18    liveins: $a0, $a1
19
20    ; MIPS32-LABEL: name: store_i32
21    ; MIPS32: liveins: $a0, $a1
22    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
23    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
24    ; MIPS32: G_STORE [[COPY]](s32), [[COPY1]](p0) :: (store 4 into %ir.ptr)
25    ; MIPS32: RetRA
26    %0:_(s32) = COPY $a0
27    %1:_(p0) = COPY $a1
28    G_STORE %0(s32), %1(p0) :: (store 4 into %ir.ptr)
29    RetRA
30
31...
32---
33name:            store_i64
34alignment:       4
35legalized:       true
36tracksRegLiveness: true
37body:             |
38  bb.1.entry:
39    liveins: $a0, $a1, $a2
40
41    ; MIPS32-LABEL: name: store_i64
42    ; MIPS32: liveins: $a0, $a1, $a2
43    ; MIPS32: [[COPY:%[0-9]+]]:gprb(s32) = COPY $a0
44    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(s32) = COPY $a1
45    ; MIPS32: [[COPY2:%[0-9]+]]:gprb(p0) = COPY $a2
46    ; MIPS32: G_STORE [[COPY]](s32), [[COPY2]](p0) :: (store 4 into %ir.ptr, align 8)
47    ; MIPS32: [[C:%[0-9]+]]:gprb(s32) = G_CONSTANT i32 4
48    ; MIPS32: [[GEP:%[0-9]+]]:gprb(p0) = G_PTR_ADD [[COPY2]], [[C]](s32)
49    ; MIPS32: G_STORE [[COPY1]](s32), [[GEP]](p0) :: (store 4 into %ir.ptr + 4, align 8)
50    ; MIPS32: RetRA
51    %2:_(s32) = COPY $a0
52    %3:_(s32) = COPY $a1
53    %0:_(s64) = G_MERGE_VALUES %2(s32), %3(s32)
54    %1:_(p0) = COPY $a2
55    G_STORE %0(s64), %1(p0) :: (store 8 into %ir.ptr)
56    RetRA
57
58...
59---
60name:            store_float
61alignment:       4
62legalized:       true
63tracksRegLiveness: true
64body:             |
65  bb.1.entry:
66    liveins: $a1, $f12
67
68    ; MIPS32-LABEL: name: store_float
69    ; MIPS32: liveins: $a1, $f12
70    ; MIPS32: [[COPY:%[0-9]+]]:fprb(s32) = COPY $f12
71    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a1
72    ; MIPS32: G_STORE [[COPY]](s32), [[COPY1]](p0) :: (store 4 into %ir.ptr)
73    ; MIPS32: RetRA
74    %0:_(s32) = COPY $f12
75    %1:_(p0) = COPY $a1
76    G_STORE %0(s32), %1(p0) :: (store 4 into %ir.ptr)
77    RetRA
78
79...
80---
81name:            store_double
82alignment:       4
83legalized:       true
84tracksRegLiveness: true
85body:             |
86  bb.1.entry:
87    liveins: $a2, $d6
88
89    ; MIPS32-LABEL: name: store_double
90    ; MIPS32: liveins: $a2, $d6
91    ; MIPS32: [[COPY:%[0-9]+]]:fprb(s64) = COPY $d6
92    ; MIPS32: [[COPY1:%[0-9]+]]:gprb(p0) = COPY $a2
93    ; MIPS32: G_STORE [[COPY]](s64), [[COPY1]](p0) :: (store 8 into %ir.ptr)
94    ; MIPS32: RetRA
95    %0:_(s64) = COPY $d6
96    %1:_(p0) = COPY $a2
97    G_STORE %0(s64), %1(p0) :: (store 8 into %ir.ptr)
98    RetRA
99
100...
101