nontemporal.ll 15 KB
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 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479
; RUN: llc < %s -mtriple aarch64-apple-darwin -asm-verbose=false -disable-post-ra | FileCheck %s

define void @test_stnp_v4i64(<4 x i64>* %p, <4 x i64> %v) #0 {
; CHECK-LABEL: test_stnp_v4i64:
; CHECK-NEXT:  stnp q0, q1, [x0]
; CHECK-NEXT:  ret
  store <4 x i64> %v, <4 x i64>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4i32(<4 x i32>* %p, <4 x i32> %v) #0 {
; CHECK-LABEL: test_stnp_v4i32:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0]
; CHECK-NEXT:  ret
  store <4 x i32> %v, <4 x i32>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v8i16(<8 x i16>* %p, <8 x i16> %v) #0 {
; CHECK-LABEL: test_stnp_v8i16:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0]
; CHECK-NEXT:  ret
  store <8 x i16> %v, <8 x i16>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v16i8(<16 x i8>* %p, <16 x i8> %v) #0 {
; CHECK-LABEL: test_stnp_v16i8:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0]
; CHECK-NEXT:  ret
  store <16 x i8> %v, <16 x i8>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2i32(<2 x i32>* %p, <2 x i32> %v) #0 {
; CHECK-LABEL: test_stnp_v2i32:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0]
; CHECK-NEXT:  ret
  store <2 x i32> %v, <2 x i32>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4i16(<4 x i16>* %p, <4 x i16> %v) #0 {
; CHECK-LABEL: test_stnp_v4i16:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0]
; CHECK-NEXT:  ret
  store <4 x i16> %v, <4 x i16>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v8i8(<8 x i8>* %p, <8 x i8> %v) #0 {
; CHECK-LABEL: test_stnp_v8i8:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0]
; CHECK-NEXT:  ret
  store <8 x i8> %v, <8 x i8>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f64(<2 x double>* %p, <2 x double> %v) #0 {
; CHECK-LABEL: test_stnp_v2f64:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0]
; CHECK-NEXT:  ret
  store <2 x double> %v, <2 x double>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32(<4 x float>* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0]
; CHECK-NEXT:  ret
  store <4 x float> %v, <4 x float>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f32(<2 x float>* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0]
; CHECK-NEXT:  ret
  store <2 x float> %v, <2 x float>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v1f64(<1 x double>* %p, <1 x double> %v) #0 {
; CHECK-LABEL: test_stnp_v1f64:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0]
; CHECK-NEXT:  ret
  store <1 x double> %v, <1 x double>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v1i64(<1 x i64>* %p, <1 x i64> %v) #0 {
; CHECK-LABEL: test_stnp_v1i64:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0]
; CHECK-NEXT:  ret
  store <1 x i64> %v, <1 x i64>* %p, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_i64(i64* %p, i64 %v) #0 {
; CHECK-LABEL: test_stnp_i64:
; CHECK-NEXT:  lsr x[[HI:[0-9]+]], x1, #32
; CHECK-NEXT:  stnp w1, w[[HI]], [x0]
; CHECK-NEXT:  ret
  store i64 %v, i64* %p, align 1, !nontemporal !0
  ret void
}


define void @test_stnp_v2f64_offset(<2 x double>* %p, <2 x double> %v) #0 {
; CHECK-LABEL: test_stnp_v2f64_offset:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0, #16]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr <2 x double>, <2 x double>* %p, i32 1
  store <2 x double> %v, <2 x double>* %tmp0, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f64_offset_neg(<2 x double>* %p, <2 x double> %v) #0 {
; CHECK-LABEL: test_stnp_v2f64_offset_neg:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0, #-16]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr <2 x double>, <2 x double>* %p, i32 -1
  store <2 x double> %v, <2 x double>* %tmp0, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f32_offset(<2 x float>* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32_offset:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0, #8]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr <2 x float>, <2 x float>* %p, i32 1
  store <2 x float> %v, <2 x float>* %tmp0, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f32_offset_neg(<2 x float>* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32_offset_neg:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0, #-8]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr <2 x float>, <2 x float>* %p, i32 -1
  store <2 x float> %v, <2 x float>* %tmp0, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_i64_offset(i64* %p, i64 %v) #0 {
; CHECK-LABEL: test_stnp_i64_offset:
; CHECK-NEXT:  lsr x[[HI:[0-9]+]], x1, #32
; CHECK-NEXT:  stnp w1, w[[HI]], [x0, #8]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i64, i64* %p, i32 1
  store i64 %v, i64* %tmp0, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_i64_offset_neg(i64* %p, i64 %v) #0 {
; CHECK-LABEL: test_stnp_i64_offset_neg:
; CHECK-NEXT:  lsr x[[HI:[0-9]+]], x1, #32
; CHECK-NEXT:  stnp w1, w[[HI]], [x0, #-8]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i64, i64* %p, i32 -1
  store i64 %v, i64* %tmp0, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_invalid_offset_4(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_invalid_offset_4:
; CHECK-NEXT:  add x[[PTR:[0-9]+]], x0, #4
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 4
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_invalid_offset_neg_4(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_invalid_offset_neg_4:
; CHECK-NEXT:  sub x[[PTR:[0-9]+]], x0, #4
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 -4
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_invalid_offset_512(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_invalid_offset_512:
; CHECK-NEXT:  add x[[PTR:[0-9]+]], x0, #512
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 512
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_offset_504(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_offset_504:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0, #504]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 504
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_invalid_offset_508(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_invalid_offset_508:
; CHECK-NEXT:  add x[[PTR:[0-9]+]], x0, #508
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 508
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_invalid_offset_neg_520(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_invalid_offset_neg_520:
; CHECK-NEXT:  sub x[[PTR:[0-9]+]], x0, #520
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 -520
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v4f32_offset_neg_512(i8* %p, <4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_offset_neg_512:
; CHECK-NEXT:  mov d[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp d0, d[[HI]], [x0, #-512]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 -512
  %tmp1 = bitcast i8* %tmp0 to <4 x float>*
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}


define void @test_stnp_v2f32_invalid_offset_256(i8* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32_invalid_offset_256:
; CHECK-NEXT:  add x[[PTR:[0-9]+]], x0, #256
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 256
  %tmp1 = bitcast i8* %tmp0 to <2 x float>*
  store <2 x float> %v, <2 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f32_offset_252(i8* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32_offset_252:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0, #252]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 252
  %tmp1 = bitcast i8* %tmp0 to <2 x float>*
  store <2 x float> %v, <2 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f32_invalid_offset_neg_260(i8* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32_invalid_offset_neg_260:
; CHECK-NEXT:  sub x[[PTR:[0-9]+]], x0, #260
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x[[PTR]]]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 -260
  %tmp1 = bitcast i8* %tmp0 to <2 x float>*
  store <2 x float> %v, <2 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

define void @test_stnp_v2f32_offset_neg_256(i8* %p, <2 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v2f32_offset_neg_256:
; CHECK-NEXT:  mov s[[HI:[0-9]+]], v0[1]
; CHECK-NEXT:  stnp s0, s[[HI]], [x0, #-256]
; CHECK-NEXT:  ret
  %tmp0 = getelementptr i8, i8* %p, i32 -256
  %tmp1 = bitcast i8* %tmp0 to <2 x float>*
  store <2 x float> %v, <2 x float>* %tmp1, align 1, !nontemporal !0
  ret void
}

declare void @dummy(<4 x float>*)

define void @test_stnp_v4f32_offset_alloca(<4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_offset_alloca:
; CHECK:       stnp d0, d{{.*}}, [sp]
; CHECK-NEXT:  mov x0, sp
; CHECK-NEXT:  bl _dummy
  %tmp0 = alloca <4 x float>
  store <4 x float> %v, <4 x float>* %tmp0, align 1, !nontemporal !0
  call void @dummy(<4 x float>* %tmp0)
  ret void
}

define void @test_stnp_v4f32_offset_alloca_2(<4 x float> %v) #0 {
; CHECK-LABEL: test_stnp_v4f32_offset_alloca_2:
; CHECK:       stnp d0, d{{.*}}, [sp, #16]
; CHECK-NEXT:  mov x0, sp
; CHECK-NEXT:  bl _dummy
  %tmp0 = alloca <4 x float>, i32 2
  %tmp1 = getelementptr <4 x float>, <4 x float>* %tmp0, i32 1
  store <4 x float> %v, <4 x float>* %tmp1, align 1, !nontemporal !0
  call void @dummy(<4 x float>* %tmp0)
  ret void
}

define void @test_stnp_v32i8(<32 x i8> %v, <32 x i8>* %ptr) {
; CHECK-LABEL: _test_stnp_v32i8:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <32 x i8> %v, <32 x i8>* %ptr, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v32i16(<32 x i16> %v, <32 x i16>* %ptr) {
; CHECK-LABEL: _test_stnp_v32i16:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q2, q3, [x0, #32]
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <32 x i16> %v, <32 x i16>* %ptr, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v32f16(<32 x half> %v, <32 x half>* %ptr) {
; CHECK-LABEL: _test_stnp_v32f16:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q2, q3, [x0, #32]
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <32 x half> %v, <32 x half>* %ptr, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v16i32(<16 x i32> %v, <16 x i32>* %ptr) {
; CHECK-LABEL: _test_stnp_v16i32:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q2, q3, [x0, #32]
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <16 x i32> %v, <16 x i32>* %ptr, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v16f32(<16 x float> %v, <16 x float>* %ptr) {
; CHECK-LABEL: _test_stnp_v16f32:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q2, q3, [x0, #32]
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <16 x float> %v, <16 x float>* %ptr, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v17f32(<17 x float> %v, <17 x float>* %ptr) {
; CHECK-LABEL: _test_stnp_v17f32:
; CHECK-NEXT:	.cfi_startproc
; CHECK-NEXT:	ldr	s16, [sp, #16]
; CHECK-NEXT:	mov.s	v0[1], v1[0]
; CHECK-NEXT:	mov.s	v4[1], v5[0]
; CHECK-NEXT:	ldr	s1, [sp]
; CHECK-NEXT:	add	x8, sp, #20
; CHECK-NEXT:	ld1.s	{ v16 }[1], [x8]
; CHECK-NEXT:	add	x8, sp, #4
; CHECK-NEXT:	ld1.s	{ v1 }[1], [x8]
; CHECK-NEXT:	add	x8, sp, #24
; CHECK-NEXT:	ld1.s	{ v16 }[2], [x8]
; CHECK-NEXT:	add	x8, sp, #8
; CHECK-NEXT:	ld1.s	{ v1 }[2], [x8]
; CHECK-NEXT:	add	x8, sp, #28
; CHECK-NEXT:	ld1.s	{ v16 }[3], [x8]
; CHECK-NEXT:	add	x8, sp, #12
; CHECK-NEXT:	mov.s	v0[2], v2[0]
; CHECK-NEXT:	ldr	s2, [sp, #32]
; CHECK-NEXT:	mov.s	v4[2], v6[0]
; CHECK-NEXT:	mov.s	v0[3], v3[0]
; CHECK-NEXT:	mov.s	v4[3], v7[0]
; CHECK-NEXT:	mov	d3, v4[1]
; CHECK-NEXT:	mov	d5, v0[1]
; CHECK-NEXT:	ld1.s	{ v1 }[3], [x8]
; CHECK-NEXT:	stnp	d4, d3, [x0, #16]
; CHECK-NEXT:	stnp	d0, d5, [x0]
; CHECK-NEXT:	mov	d0, v16[1]
; CHECK-NEXT:	mov	d3, v1[1]
; CHECK-NEXT:	stnp	d16, d0, [x0, #48]
; CHECK-NEXT:	stnp	d1, d3, [x0, #32]
; CHECK-NEXT:	str	s2, [x0, #64]
; CHECK-NEXT:	ret

entry:
  store <17 x float> %v, <17 x float>* %ptr, align 4, !nontemporal !0
  ret void
}
define void @test_stnp_v16i32_invalid_offset(<16 x i32> %v, <16 x i32>* %ptr) {
; CHECK-LABEL: _test_stnp_v16i32_invalid_offset:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    mov w8, #32000
; CHECK-NEXT:    mov w9, #32032
; CHECK-NEXT:    add x8, x0, x8
; CHECK-NEXT:    add x9, x0, x9
; CHECK-NEXT:    stnp    q2, q3, [x9]
; CHECK-NEXT:    stnp    q0, q1, [x8]
; CHECK-NEXT:    ret

entry:
  %gep = getelementptr <16 x i32>, <16 x i32>* %ptr, i32 500
  store <16 x i32> %v, <16 x i32>* %gep, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v16f64(<16 x double> %v, <16 x double>* %ptr) {
; CHECK-LABEL: _test_stnp_v16f64:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q6, q7, [x0, #96]
; CHECK-NEXT:    stnp    q4, q5, [x0, #64]
; CHECK-NEXT:    stnp    q2, q3, [x0, #32]
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <16 x double> %v, <16 x double>* %ptr, align 4, !nontemporal !0
  ret void
}

define void @test_stnp_v16i64(<16 x i64> %v, <16 x i64>* %ptr) {
; CHECK-LABEL: _test_stnp_v16i64:
; CHECK-NEXT:    .cfi_startproc
; CHECK-NEXT:    stnp    q6, q7, [x0, #96]
; CHECK-NEXT:    stnp    q4, q5, [x0, #64]
; CHECK-NEXT:    stnp    q2, q3, [x0, #32]
; CHECK-NEXT:    stnp    q0, q1, [x0]
; CHECK-NEXT:    ret

entry:
  store <16 x i64> %v, <16 x i64>* %ptr, align 4, !nontemporal !0
  ret void
}

!0 = !{ i32 1 }

attributes #0 = { nounwind }