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
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 }
19 tracksRegLiveness: true
20 machineFunctionInfo: {}
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)
31 %1:gpr(s64) = COPY $x1
32 %ptr:gpr(p0) = G_GEP %0, %1
33 %3:gpr(s64) = COPY $x2
34 G_STORE %3, %ptr :: (store 8 into %ir.addr)
41 tracksRegLiveness: true
42 machineFunctionInfo: {}
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)
53 %1:gpr(s64) = COPY $x1
54 %ptr:gpr(p0) = G_GEP %0, %1
55 %3:fpr(s64) = COPY $d2
56 G_STORE %3, %ptr :: (store 8 into %ir.addr)
63 tracksRegLiveness: true
64 machineFunctionInfo: {}
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)
75 %1:gpr(s64) = COPY $x1
76 %ptr:gpr(p0) = G_GEP %0, %1
77 %3:gpr(s32) = COPY $w2
78 G_STORE %3, %ptr :: (store 4 into %ir.addr)
85 tracksRegLiveness: true
86 machineFunctionInfo: {}
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)
97 %1:gpr(s64) = COPY $x1
98 %ptr:gpr(p0) = G_GEP %0, %1
99 %3:fpr(s32) = COPY $s2
100 G_STORE %3, %ptr :: (store 4 into %ir.addr)
106 regBankSelected: true
107 tracksRegLiveness: true
108 machineFunctionInfo: {}
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_GEP %0, %1
121 %3:fpr(s16) = COPY $h0
122 G_STORE %3, %ptr :: (store 2 into %ir.addr)
128 regBankSelected: true
129 tracksRegLiveness: true
130 machineFunctionInfo: {}
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_GEP %0, %1
143 %2:fpr(<2 x s64>) = COPY $q2
144 G_STORE %2, %ptr :: (store 16 into %ir.addr)
150 regBankSelected: true
151 tracksRegLiveness: true
152 machineFunctionInfo: {}
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_GEP %3, %2
167 %4:gpr(s64) = COPY $x2
168 G_STORE %4, %ptr :: (store 8 into %ir.addr)