@@ -1285,17 +1285,55 @@ define void @load_factor4_one_active_storeback_full(ptr %ptr) {
1285
1285
ret void
1286
1286
}
1287
1287
1288
- ; TODO: This should be a strided store
1289
- define void @store_factor4_one_active_storeback (ptr %ptr , <4 x i32 > %v ) {
1290
- ; CHECK-LABEL: store_factor4_one_active_storeback:
1288
+ define void @store_factor4_one_active (ptr %ptr , <4 x i32 > %v ) {
1289
+ ; CHECK-LABEL: store_factor4_one_active:
1291
1290
; CHECK: # %bb.0:
1291
+ ; CHECK-NEXT: li a1, 16
1292
1292
; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1293
- ; CHECK-NEXT: vslideup.vi v9, v8, 1
1294
- ; CHECK-NEXT: vmv.v.v v10, v9
1295
- ; CHECK-NEXT: vmv.v.v v11, v9
1296
- ; CHECK-NEXT: vsseg4e32.v v8, (a0)
1293
+ ; CHECK-NEXT: vsse32.v v8, (a0), a1
1297
1294
; CHECK-NEXT: ret
1298
1295
%v0 = shufflevector <4 x i32 > %v , <4 x i32 > poison, <16 x i32 > <i32 0 , i32 undef , i32 undef , i32 undef , i32 1 , i32 undef , i32 undef , i32 undef , i32 2 , i32 undef , i32 undef , i32 undef , i32 3 , i32 undef , i32 undef , i32 undef >
1299
1296
store <16 x i32 > %v0 , ptr %ptr
1300
1297
ret void
1301
1298
}
1299
+
1300
+ define void @store_factor4_one_active_idx1 (ptr %ptr , <4 x i32 > %v ) {
1301
+ ; CHECK-LABEL: store_factor4_one_active_idx1:
1302
+ ; CHECK: # %bb.0:
1303
+ ; CHECK-NEXT: addi a0, a0, 4
1304
+ ; CHECK-NEXT: li a1, 16
1305
+ ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1306
+ ; CHECK-NEXT: vsse32.v v8, (a0), a1
1307
+ ; CHECK-NEXT: ret
1308
+ %v0 = shufflevector <4 x i32 > %v , <4 x i32 > poison, <16 x i32 > <i32 undef , i32 0 , i32 undef , i32 undef , i32 undef , i32 1 , i32 undef , i32 undef , i32 undef , i32 2 , i32 undef , i32 undef , i32 undef , i32 3 , i32 undef , i32 undef >
1309
+ store <16 x i32 > %v0 , ptr %ptr
1310
+ ret void
1311
+ }
1312
+
1313
+ define void @store_factor4_one_active_fullwidth (ptr %ptr , <16 x i32 > %v ) {
1314
+ ; CHECK-LABEL: store_factor4_one_active_fullwidth:
1315
+ ; CHECK: # %bb.0:
1316
+ ; CHECK-NEXT: li a1, 16
1317
+ ; CHECK-NEXT: vsetivli zero, 4, e32, m4, ta, ma
1318
+ ; CHECK-NEXT: vsse32.v v8, (a0), a1
1319
+ ; CHECK-NEXT: ret
1320
+ %v0 = shufflevector <16 x i32 > %v , <16 x i32 > poison, <16 x i32 > <i32 0 , i32 undef , i32 undef , i32 undef , i32 1 , i32 undef , i32 undef , i32 undef , i32 2 , i32 undef , i32 undef , i32 undef , i32 3 , i32 undef , i32 undef , i32 undef >
1321
+ store <16 x i32 > %v0 , ptr %ptr
1322
+ ret void
1323
+ }
1324
+
1325
+ ; TODO: This could be a vslidedown followed by a strided store
1326
+ define void @store_factor4_one_active_slidedown (ptr %ptr , <4 x i32 > %v ) {
1327
+ ; CHECK-LABEL: store_factor4_one_active_slidedown:
1328
+ ; CHECK: # %bb.0:
1329
+ ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1330
+ ; CHECK-NEXT: vslidedown.vi v9, v8, 1
1331
+ ; CHECK-NEXT: vslideup.vi v10, v8, 1
1332
+ ; CHECK-NEXT: vmv.v.v v11, v10
1333
+ ; CHECK-NEXT: vmv.v.v v12, v10
1334
+ ; CHECK-NEXT: vsseg4e32.v v9, (a0)
1335
+ ; CHECK-NEXT: ret
1336
+ %v0 = shufflevector <4 x i32 > %v , <4 x i32 > poison, <16 x i32 > <i32 1 , i32 undef , i32 undef , i32 undef , i32 2 , i32 undef , i32 undef , i32 undef , i32 3 , i32 undef , i32 undef , i32 undef , i32 4 , i32 undef , i32 undef , i32 undef >
1337
+ store <16 x i32 > %v0 , ptr %ptr
1338
+ ret void
1339
+ }
0 commit comments