1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2# RUN: llc -mtriple=aarch64-unknown-unknown -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
3
4--- |
5  define void @strxrox(i64* %addr) { ret void }
6  define void @strdrox(i64* %addr) { ret void }
7  define void @strwrox(i64* %addr) { ret void }
8  define void @strsrox(i64* %addr) { ret void }
9  define void @strhrox(i64* %addr) { ret void }
10  define void @strqrox(i64* %addr) { ret void }
11  define void @shl(i64* %addr) { ret void }
12...
13
14---
15name:            strxrox
16alignment:       4
17legalized:       true
18regBankSelected: true
19tracksRegLiveness: true
20machineFunctionInfo: {}
21body:             |
22  bb.0:
23    liveins: $x0, $x1, $x2
24    ; CHECK-LABEL: name: strxrox
25    ; CHECK: liveins: $x0, $x1, $x2
26    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
27    ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
28    ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
29    ; CHECK: STRXroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store 8 into %ir.addr)
30    %0:gpr(p0) = COPY $x0
31    %1:gpr(s64) = COPY $x1
32    %ptr:gpr(p0) = G_PTR_ADD %0, %1
33    %3:gpr(s64) = COPY $x2
34    G_STORE %3, %ptr :: (store 8 into %ir.addr)
35...
36---
37name:            strdrox
38alignment:       4
39legalized:       true
40regBankSelected: true
41tracksRegLiveness: true
42machineFunctionInfo: {}
43body:             |
44  bb.0:
45    liveins: $x0, $x1, $d2
46    ; CHECK-LABEL: name: strdrox
47    ; CHECK: liveins: $x0, $x1, $d2
48    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
49    ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
50    ; CHECK: [[COPY2:%[0-9]+]]:fpr64 = COPY $d2
51    ; CHECK: STRDroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store 8 into %ir.addr)
52    %0:gpr(p0) = COPY $x0
53    %1:gpr(s64) = COPY $x1
54    %ptr:gpr(p0) = G_PTR_ADD %0, %1
55    %3:fpr(s64) = COPY $d2
56    G_STORE %3, %ptr :: (store 8 into %ir.addr)
57...
58---
59name:            strwrox
60alignment:       4
61legalized:       true
62regBankSelected: true
63tracksRegLiveness: true
64machineFunctionInfo: {}
65body:             |
66  bb.0:
67    liveins: $x0, $x1, $w2
68    ; CHECK-LABEL: name: strwrox
69    ; CHECK: liveins: $x0, $x1, $w2
70    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
71    ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
72    ; CHECK: [[COPY2:%[0-9]+]]:gpr32 = COPY $w2
73    ; CHECK: STRWroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store 4 into %ir.addr)
74    %0:gpr(p0) = COPY $x0
75    %1:gpr(s64) = COPY $x1
76    %ptr:gpr(p0) = G_PTR_ADD %0, %1
77    %3:gpr(s32) = COPY $w2
78    G_STORE %3, %ptr :: (store 4 into %ir.addr)
79...
80---
81name:            strsrox
82alignment:       4
83legalized:       true
84regBankSelected: true
85tracksRegLiveness: true
86machineFunctionInfo: {}
87body:             |
88  bb.0:
89    liveins: $x0, $x1, $s2
90    ; CHECK-LABEL: name: strsrox
91    ; CHECK: liveins: $x0, $x1, $s2
92    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
93    ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
94    ; CHECK: [[COPY2:%[0-9]+]]:fpr32 = COPY $s2
95    ; CHECK: STRSroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store 4 into %ir.addr)
96    %0:gpr(p0) = COPY $x0
97    %1:gpr(s64) = COPY $x1
98    %ptr:gpr(p0) = G_PTR_ADD %0, %1
99    %3:fpr(s32) = COPY $s2
100    G_STORE %3, %ptr :: (store 4 into %ir.addr)
101...
102---
103name:            strhrox
104alignment:       4
105legalized:       true
106regBankSelected: true
107tracksRegLiveness: true
108machineFunctionInfo: {}
109body:             |
110  bb.0:
111    liveins: $x0, $x1, $h0
112    ; CHECK-LABEL: name: strhrox
113    ; CHECK: liveins: $x0, $x1, $h0
114    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
115    ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
116    ; CHECK: [[COPY2:%[0-9]+]]:fpr16 = COPY $h0
117    ; CHECK: STRHroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store 2 into %ir.addr)
118    %0:gpr(p0) = COPY $x0
119    %1:gpr(s64) = COPY $x1
120    %ptr:gpr(p0) = G_PTR_ADD %0, %1
121    %3:fpr(s16) = COPY $h0
122    G_STORE %3, %ptr :: (store 2 into %ir.addr)
123...
124---
125name:            strqrox
126alignment:       4
127legalized:       true
128regBankSelected: true
129tracksRegLiveness: true
130machineFunctionInfo: {}
131body:             |
132  bb.0:
133    liveins: $x0, $x1, $q2
134    ; CHECK-LABEL: name: strqrox
135    ; CHECK: liveins: $x0, $x1, $q2
136    ; CHECK: [[COPY:%[0-9]+]]:gpr64sp = COPY $x0
137    ; CHECK: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
138    ; CHECK: [[COPY2:%[0-9]+]]:fpr128 = COPY $q2
139    ; CHECK: STRQroX [[COPY2]], [[COPY]], [[COPY1]], 0, 0 :: (store 16 into %ir.addr)
140    %0:gpr(p0) = COPY $x0
141    %1:gpr(s64) = COPY $x1
142    %ptr:gpr(p0) = G_PTR_ADD %0, %1
143    %2:fpr(<2 x s64>) = COPY $q2
144    G_STORE %2, %ptr :: (store 16 into %ir.addr)
145...
146---
147name:            shl
148alignment:       4
149legalized:       true
150regBankSelected: true
151tracksRegLiveness: true
152machineFunctionInfo: {}
153body:             |
154  bb.0:
155    liveins: $x0, $x1, $x2
156    ; CHECK-LABEL: name: shl
157    ; CHECK: liveins: $x0, $x1, $x2
158    ; CHECK: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
159    ; CHECK: [[COPY1:%[0-9]+]]:gpr64sp = COPY $x1
160    ; CHECK: [[COPY2:%[0-9]+]]:gpr64 = COPY $x2
161    ; CHECK: STRXroX [[COPY2]], [[COPY1]], [[COPY]], 0, 1 :: (store 8 into %ir.addr)
162    %0:gpr(s64) = COPY $x0
163    %1:gpr(s64) = G_CONSTANT i64 3
164    %2:gpr(s64) = G_SHL %0, %1(s64)
165    %3:gpr(p0) = COPY $x1
166    %ptr:gpr(p0) = G_PTR_ADD %3, %2
167    %4:gpr(s64) = COPY $x2
168    G_STORE %4, %ptr :: (store 8 into %ir.addr)
169