@@ -1340,3 +1340,31 @@ define void @shuffle_i256_splat(ptr %p) nounwind {
13401340 ret void
13411341}
13421342
1343+ define <16 x i32 > @shuffle_m1_prefix (<16 x i32 > %a ) {
1344+ ; CHECK-LABEL: shuffle_m1_prefix:
1345+ ; CHECK: # %bb.0:
1346+ ; CHECK-NEXT: lui a0, 8208
1347+ ; CHECK-NEXT: addi a0, a0, 770
1348+ ; CHECK-NEXT: vsetivli zero, 4, e32, m1, ta, ma
1349+ ; CHECK-NEXT: vmv.s.x v9, a0
1350+ ; CHECK-NEXT: vsext.vf4 v10, v9
1351+ ; CHECK-NEXT: vrgather.vv v12, v8, v10
1352+ ; CHECK-NEXT: vmv4r.v v8, v12
1353+ ; CHECK-NEXT: ret
1354+ %out = shufflevector <16 x i32 > %a , <16 x i32 > poison, <16 x i32 > <i32 2 , i32 3 , i32 1 , i32 2 , i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
1355+ ret <16 x i32 > %out
1356+ }
1357+
1358+ define <16 x i32 > @shuffle_m2_prefix (<16 x i32 > %a ) {
1359+ ; CHECK-LABEL: shuffle_m2_prefix:
1360+ ; CHECK: # %bb.0:
1361+ ; CHECK-NEXT: lui a0, %hi(.LCPI85_0)
1362+ ; CHECK-NEXT: addi a0, a0, %lo(.LCPI85_0)
1363+ ; CHECK-NEXT: vsetivli zero, 8, e32, m2, ta, ma
1364+ ; CHECK-NEXT: vle16.v v14, (a0)
1365+ ; CHECK-NEXT: vrgatherei16.vv v12, v8, v14
1366+ ; CHECK-NEXT: vmv4r.v v8, v12
1367+ ; CHECK-NEXT: ret
1368+ %out = shufflevector <16 x i32 > %a , <16 x i32 > poison, <16 x i32 > <i32 2 , i32 3 , i32 5 , i32 2 , i32 3 , i32 5 , i32 7 , i32 4 , i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison, i32 poison>
1369+ ret <16 x i32 > %out
1370+ }
0 commit comments