@@ -266,13 +266,21 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
266
266
{s32, p0, s16, 16 },
267
267
{s32, p0, s32, 32 },
268
268
{p0, p0, sXLen , XLen},
269
- {nxv1s8, p0, nxv1s8, 8 },
270
269
{nxv2s8, p0, nxv2s8, 8 },
271
270
{nxv4s8, p0, nxv4s8, 8 },
272
271
{nxv8s8, p0, nxv8s8, 8 },
273
- {nxv16s8, p0, nxv16s8, 8 }})
274
- .widenScalarToNextPow2 (0 , /* MinSize = */ 8 )
275
- .lowerIfMemSizeNotByteSizePow2 ();
272
+ {nxv16s8, p0, nxv16s8, 8 },
273
+ {nxv32s8, p0, nxv32s8, 8 },
274
+ {nxv64s8, p0, nxv64s8, 8 },
275
+ {nxv2s16, p0, nxv2s16, 16 },
276
+ {nxv4s16, p0, nxv4s16, 16 },
277
+ {nxv8s16, p0, nxv8s16, 16 },
278
+ {nxv16s16, p0, nxv16s16, 16 },
279
+ {nxv32s16, p0, nxv32s16, 16 },
280
+ {nxv2s32, p0, nxv2s32, 32 },
281
+ {nxv4s32, p0, nxv4s32, 32 },
282
+ {nxv8s32, p0, nxv8s32, 32 },
283
+ {nxv16s32, p0, nxv16s32, 32 }});
276
284
277
285
auto &ExtLoadActions =
278
286
getActionDefinitionsBuilder ({G_SEXTLOAD, G_ZEXTLOAD})
@@ -287,6 +295,18 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST)
287
295
} else if (ST.hasStdExtD ()) {
288
296
LoadStoreActions.legalForTypesWithMemDesc ({{s64, p0, s64, 64 }});
289
297
}
298
+ if (ST.getELen () == 64 )
299
+ LoadStoreActions.legalForTypesWithMemDesc ({{nxv1s8, p0, nxv1s8, 8 },
300
+ {nxv1s16, p0, nxv1s16, 16 },
301
+ {nxv1s32, p0, nxv1s32, 32 }});
302
+ if (ST.hasVInstructionsI64 ())
303
+ LoadStoreActions.legalForTypesWithMemDesc ({{nxv1s64, p0, nxv1s64, 64 },
304
+ {nxv2s64, p0, nxv2s64, 64 },
305
+ {nxv4s64, p0, nxv4s64, 64 },
306
+ {nxv8s64, p0, nxv8s64, 64 }});
307
+ LoadStoreActions.widenScalarToNextPow2 (0 , /* MinSize = */ 8 )
308
+ .lowerIfMemSizeNotByteSizePow2 ();
309
+
290
310
LoadStoreActions.clampScalar (0 , s32, sXLen ).lower ();
291
311
ExtLoadActions.widenScalarToNextPow2 (0 ).clampScalar (0 , s32, sXLen ).lower ();
292
312
0 commit comments