1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mattr=+sve < %s | FileCheck %s
5 target triple = "aarch64-unknown-linux-gnu"
11 define void @masked_store_v16i8(ptr %dst, <16 x i1> %mask) {
12 ; CHECK-LABEL: masked_store_v16i8:
14 ; CHECK-NEXT: shl v0.16b, v0.16b, #7
15 ; CHECK-NEXT: ptrue p0.b, vl16
16 ; CHECK-NEXT: cmlt v0.16b, v0.16b, #0
17 ; CHECK-NEXT: cmpne p0.b, p0/z, z0.b, #0
18 ; CHECK-NEXT: movi v0.2d, #0000000000000000
19 ; CHECK-NEXT: st1b { z0.b }, p0, [x0]
21 call void @llvm.masked.store.v16i8(<16 x i8> zeroinitializer, ptr %dst, i32 8, <16 x i1> %mask)
25 define void @masked_store_v8f16(ptr %dst, <8 x i1> %mask) {
26 ; CHECK-LABEL: masked_store_v8f16:
28 ; CHECK-NEXT: ushll v0.8h, v0.8b, #0
29 ; CHECK-NEXT: ptrue p0.h, vl8
30 ; CHECK-NEXT: shl v0.8h, v0.8h, #15
31 ; CHECK-NEXT: cmlt v0.8h, v0.8h, #0
32 ; CHECK-NEXT: cmpne p0.h, p0/z, z0.h, #0
33 ; CHECK-NEXT: movi v0.2d, #0000000000000000
34 ; CHECK-NEXT: st1h { z0.h }, p0, [x0]
36 call void @llvm.masked.store.v8f16(<8 x half> zeroinitializer, ptr %dst, i32 8, <8 x i1> %mask)
40 define void @masked_store_v4f32(ptr %dst, <4 x i1> %mask) {
41 ; CHECK-LABEL: masked_store_v4f32:
43 ; CHECK-NEXT: ushll v0.4s, v0.4h, #0
44 ; CHECK-NEXT: ptrue p0.s, vl4
45 ; CHECK-NEXT: shl v0.4s, v0.4s, #31
46 ; CHECK-NEXT: cmlt v0.4s, v0.4s, #0
47 ; CHECK-NEXT: cmpne p0.s, p0/z, z0.s, #0
48 ; CHECK-NEXT: movi v0.2d, #0000000000000000
49 ; CHECK-NEXT: st1w { z0.s }, p0, [x0]
51 call void @llvm.masked.store.v4f32(<4 x float> zeroinitializer, ptr %dst, i32 8, <4 x i1> %mask)
55 define void @masked_store_v2f64(ptr %dst, <2 x i1> %mask) {
56 ; CHECK-LABEL: masked_store_v2f64:
58 ; CHECK-NEXT: ushll v0.2d, v0.2s, #0
59 ; CHECK-NEXT: ptrue p0.d, vl2
60 ; CHECK-NEXT: shl v0.2d, v0.2d, #63
61 ; CHECK-NEXT: cmlt v0.2d, v0.2d, #0
62 ; CHECK-NEXT: cmpne p0.d, p0/z, z0.d, #0
63 ; CHECK-NEXT: movi v0.2d, #0000000000000000
64 ; CHECK-NEXT: st1d { z0.d }, p0, [x0]
66 call void @llvm.masked.store.v2f64(<2 x double> zeroinitializer, ptr %dst, i32 8, <2 x i1> %mask)
70 declare void @llvm.masked.store.v16i8(<16 x i8>, ptr, i32, <16 x i1>)
71 declare void @llvm.masked.store.v8f16(<8 x half>, ptr, i32, <8 x i1>)
72 declare void @llvm.masked.store.v4f32(<4 x float>, ptr, i32, <4 x i1>)
73 declare void @llvm.masked.store.v2f64(<2 x double>, ptr, i32, <2 x i1>)