1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325
|
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -mtriple=aarch64-none-eabi -mattr=+v8.9a -mattr=+rcpc3 < %s | FileCheck --check-prefixes=BOTH,RCPC3 %s
; RUN: llc -mtriple=aarch64-none-eabi -mattr=+v8.9a < %s | FileCheck --check-prefixes=BOTH,NO-RCPC3 %s
define hidden <2 x i64> @test_ldap1_2xi64_lane0(ptr nocapture noundef readonly %a, <2 x i64> noundef %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_ldap1_2xi64_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: ldap1 { v0.d }[0], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_ldap1_2xi64_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: ldapr x8, [x0]
; NO-RCPC3-NEXT: mov v0.d[0], x8
; NO-RCPC3-NEXT: ret
%1 = load atomic i64, ptr %a acquire, align 8
%ldap1 = insertelement <2 x i64> %b, i64 %1, i64 0
ret <2 x i64> %ldap1
}
define hidden <2 x i64> @test_ldap1_2xi64_lane1(ptr nocapture noundef readonly %a, <2 x i64> noundef %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_ldap1_2xi64_lane1:
; RCPC3: // %bb.0:
; RCPC3-NEXT: ldap1 { v0.d }[1], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_ldap1_2xi64_lane1:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: ldapr x8, [x0]
; NO-RCPC3-NEXT: mov v0.d[1], x8
; NO-RCPC3-NEXT: ret
%1 = load atomic i64, ptr %a acquire, align 8
%ldap1 = insertelement <2 x i64> %b, i64 %1, i64 1
ret <2 x i64> %ldap1
}
define hidden nofpclass(nan inf) <2 x double> @test_ldap1_2xdouble_lane0(ptr nocapture noundef readonly %a, <2 x double> noundef nofpclass(nan inf) %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_ldap1_2xdouble_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: ldap1 { v0.d }[0], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_ldap1_2xdouble_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: ldapr x8, [x0]
; NO-RCPC3-NEXT: fmov d1, x8
; NO-RCPC3-NEXT: mov v0.d[0], v1.d[0]
; NO-RCPC3-NEXT: ret
%1 = load atomic double, ptr %a acquire, align 8
%ldap1 = insertelement <2 x double> %b, double %1, i64 0
ret <2 x double> %ldap1
}
define hidden nofpclass(nan inf) <2 x double> @test_ldap1_2xdouble_lane1(ptr nocapture noundef readonly %a, <2 x double> noundef nofpclass(nan inf) %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_ldap1_2xdouble_lane1:
; RCPC3: // %bb.0:
; RCPC3-NEXT: ldap1 { v0.d }[1], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_ldap1_2xdouble_lane1:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: ldapr x8, [x0]
; NO-RCPC3-NEXT: fmov d1, x8
; NO-RCPC3-NEXT: mov v0.d[1], v1.d[0]
; NO-RCPC3-NEXT: ret
%1 = load atomic double, ptr %a acquire, align 8
%ldap1 = insertelement <2 x double> %b, double %1, i64 1
ret <2 x double> %ldap1
}
define hidden <1 x i64> @test_ldap1_1xi64_lane0(ptr nocapture noundef readonly %a, <1 x i64> noundef %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_ldap1_1xi64_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: ldap1 { v0.d }[0], [x0]
; RCPC3-NEXT: // kill: def $d0 killed $d0 killed $q0
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_ldap1_1xi64_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: ldapr x8, [x0]
; NO-RCPC3-NEXT: fmov d0, x8
; NO-RCPC3-NEXT: ret
%1 = load atomic i64, ptr %a acquire, align 8
%ldap1 = insertelement <1 x i64> poison, i64 %1, i64 0
ret <1 x i64> %ldap1
}
define hidden nofpclass(nan inf) <1 x double> @test_ldap1_1xdouble_lane0(ptr nocapture noundef readonly %a, <1 x double> noundef nofpclass(nan inf) %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_ldap1_1xdouble_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: ldap1 { v0.d }[0], [x0]
; RCPC3-NEXT: // kill: def $d0 killed $d0 killed $q0
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_ldap1_1xdouble_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: ldapr x8, [x0]
; NO-RCPC3-NEXT: fmov d0, x8
; NO-RCPC3-NEXT: ret
%1 = load atomic double, ptr %a acquire, align 8
%ldap1 = insertelement <1 x double> poison, double %1, i64 0
ret <1 x double> %ldap1
}
define hidden void @test_stl1_2xi64_lane0(ptr nocapture noundef writeonly %a, <2 x i64> noundef %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_stl1_2xi64_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: stl1 { v0.d }[0], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_stl1_2xi64_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: fmov x8, d0
; NO-RCPC3-NEXT: stlr x8, [x0]
; NO-RCPC3-NEXT: ret
%1 = extractelement <2 x i64> %b, i64 0
store atomic i64 %1, ptr %a release, align 8
ret void
}
define hidden void @test_stl1_2xi64_lane1(ptr nocapture noundef writeonly %a, <2 x i64> noundef %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_stl1_2xi64_lane1:
; RCPC3: // %bb.0:
; RCPC3-NEXT: stl1 { v0.d }[1], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_stl1_2xi64_lane1:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: mov x8, v0.d[1]
; NO-RCPC3-NEXT: stlr x8, [x0]
; NO-RCPC3-NEXT: ret
%1 = extractelement <2 x i64> %b, i64 1
store atomic i64 %1, ptr %a release, align 8
ret void
}
define hidden void @test_stl1_2xdouble_lane0(ptr nocapture noundef writeonly %a, <2 x double> noundef nofpclass(nan inf) %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_stl1_2xdouble_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: stl1 { v0.d }[0], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_stl1_2xdouble_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: fmov x8, d0
; NO-RCPC3-NEXT: stlr x8, [x0]
; NO-RCPC3-NEXT: ret
%1 = extractelement <2 x double> %b, i64 0
store atomic double %1, ptr %a release, align 8
ret void
}
define hidden void @test_stl1_2xdouble_lane1(ptr nocapture noundef writeonly %a, <2 x double> noundef nofpclass(nan inf) %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_stl1_2xdouble_lane1:
; RCPC3: // %bb.0:
; RCPC3-NEXT: stl1 { v0.d }[1], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_stl1_2xdouble_lane1:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: mov d0, v0.d[1]
; NO-RCPC3-NEXT: fmov x8, d0
; NO-RCPC3-NEXT: stlr x8, [x0]
; NO-RCPC3-NEXT: ret
%1 = extractelement <2 x double> %b, i64 1
store atomic double %1, ptr %a release, align 8
ret void
}
define hidden void @test_stl1_1xi64_lane0(ptr nocapture noundef writeonly %a, <1 x i64> noundef %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_stl1_1xi64_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: // kill: def $d0 killed $d0 def $q0
; RCPC3-NEXT: stl1 { v0.d }[0], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_stl1_1xi64_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: // kill: def $d0 killed $d0 def $q0
; NO-RCPC3-NEXT: fmov x8, d0
; NO-RCPC3-NEXT: stlr x8, [x0]
; NO-RCPC3-NEXT: ret
%1 = extractelement <1 x i64> %b, i64 0
store atomic i64 %1, ptr %a release, align 8
ret void
}
define hidden void @test_stl1_1xdouble_lane0(ptr nocapture noundef writeonly %a, <1 x double> noundef nofpclass(nan inf) %b) local_unnamed_addr {
;
; RCPC3-LABEL: test_stl1_1xdouble_lane0:
; RCPC3: // %bb.0:
; RCPC3-NEXT: // kill: def $d0 killed $d0 def $q0
; RCPC3-NEXT: stl1 { v0.d }[0], [x0]
; RCPC3-NEXT: ret
;
; NO-RCPC3-LABEL: test_stl1_1xdouble_lane0:
; NO-RCPC3: // %bb.0:
; NO-RCPC3-NEXT: fmov x8, d0
; NO-RCPC3-NEXT: stlr x8, [x0]
; NO-RCPC3-NEXT: ret
%1 = extractelement <1 x double> %b, i64 0
store atomic double %1, ptr %a release, align 8
ret void
}
; The remaining tests do not have any particular RCPC3-specific codegen:
; load-acquire a plain non-vector double value
define hidden double @test_double_load(ptr nocapture noundef readonly %a) local_unnamed_addr {
; BOTH-LABEL: test_double_load:
; BOTH: // %bb.0:
; BOTH-NEXT: ldapr x8, [x0]
; BOTH-NEXT: fmov d0, x8
; BOTH-NEXT: ret
%1 = load atomic double, ptr %a acquire, align 8
ret double %1
}
; store-release a plain non-vector double value
define hidden void @test_double_store(ptr nocapture noundef writeonly %a, double noundef %b) local_unnamed_addr {
; BOTH-LABEL: test_double_store:
; BOTH: // %bb.0:
; BOTH-NEXT: fmov x8, d0
; BOTH-NEXT: stlr x8, [x0]
; BOTH-NEXT: ret
store atomic double %b, ptr %a release, align 8
ret void
}
; load-acquire an i64, followed by a bitcast to a 64-bit vector
define hidden <2 x i32> @test_load_i64_bitcast_2xi32(ptr nocapture noundef readonly %a) local_unnamed_addr {
; BOTH-LABEL: test_load_i64_bitcast_2xi32:
; BOTH: // %bb.0:
; BOTH-NEXT: ldapr x8, [x0]
; BOTH-NEXT: fmov d0, x8
; BOTH-NEXT: ret
%1 = load atomic i64, ptr %a acquire, align 8
%2 = bitcast i64 %1 to <2 x i32>
ret <2 x i32> %2
}
; bitcast from a 64-bit vector, followed by a store-release of the i64
define hidden void @test_bitcast_2xi32_store_i64(ptr nocapture noundef readonly %a, <2 x i32> noundef %b) local_unnamed_addr {
; BOTH-LABEL: test_bitcast_2xi32_store_i64:
; BOTH: // %bb.0:
; BOTH-NEXT: fmov x8, d0
; BOTH-NEXT: stlr x8, [x0]
; BOTH-NEXT: ret
%1 = bitcast <2 x i32> %b to i64
store atomic i64 %1, ptr %a release, align 8
ret void
}
; (non-atomic) load a 64-bit vector
define hidden <2 x i32> @test_load_2xi32(ptr nocapture noundef readonly %a) local_unnamed_addr {
; BOTH-LABEL: test_load_2xi32:
; BOTH: // %bb.0:
; BOTH-NEXT: ldr d0, [x0]
; BOTH-NEXT: ret
%1 = load <2 x i32>, ptr %a, align 8
ret <2 x i32> %1
}
; (non-atomic) store a 64-bit vector
define hidden void @test_store_2xi32(ptr nocapture noundef writeonly %a, <2 x i32> noundef %b) local_unnamed_addr {
; BOTH-LABEL: test_store_2xi32:
; BOTH: // %bb.0:
; BOTH-NEXT: str d0, [x0]
; BOTH-NEXT: ret
store <2 x i32> %b, ptr %a, align 8
ret void
}
; (non-atomic) load a 64-bit vector
define hidden <1 x i64> @test_load_1xi64(ptr nocapture noundef readonly %a) local_unnamed_addr {
; BOTH-LABEL: test_load_1xi64:
; BOTH: // %bb.0:
; BOTH-NEXT: ldr d0, [x0]
; BOTH-NEXT: ret
%1 = load <1 x i64>, ptr %a, align 8
ret <1 x i64> %1
}
; (non-atomic) store a 64-bit vector
define hidden void @test_store_1xi64(ptr nocapture noundef writeonly %a, <1 x i64> noundef %b) local_unnamed_addr {
; BOTH-LABEL: test_store_1xi64:
; BOTH: // %bb.0:
; BOTH-NEXT: str d0, [x0]
; BOTH-NEXT: ret
store <1 x i64> %b, ptr %a, align 8
ret void
}
; (non-atomic) load a 64-bit value and insert into vector
define hidden <2 x i64> @test_load_insert_2xi64(ptr nocapture noundef readonly %a, <2 x i64> noundef %b) local_unnamed_addr {
; BOTH-LABEL: test_load_insert_2xi64:
; BOTH: // %bb.0:
; BOTH-NEXT: ld1 { v0.d }[0], [x0]
; BOTH-NEXT: ret
%1 = load i64, ptr %a, align 8
%2 = insertelement <2 x i64> %b, i64 %1, i64 0
ret <2 x i64> %2
}
; extract from vector and (non-atomic) store a 64-bit value
define hidden void @test_extract_store_2xi64(ptr nocapture noundef writeonly %a, <2 x i64> noundef %b) local_unnamed_addr {
; BOTH-LABEL: test_extract_store_2xi64:
; BOTH: // %bb.0:
; BOTH-NEXT: st1 { v0.d }[1], [x0]
; BOTH-NEXT: ret
%1 = extractelement <2 x i64> %b, i64 1
store i64 %1, ptr %a, align 8
ret void
}
|