[llvm] [RISCV][GlobalISel] Vector Extension vadd Legalizer (PR #71400)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 8 09:23:12 PST 2023


================
@@ -31,10 +31,16 @@ RISCVLegalizerInfo::RISCVLegalizerInfo(const RISCVSubtarget &ST) {
   const LLT s32 = LLT::scalar(32);
   const LLT s64 = LLT::scalar(64);
 
+  const LLT nxv1s8 = LLT::scalable_vector(1, s8);
+  const LLT nxv2s8 = LLT::scalable_vector(2, s8);
+  const LLT nxv4s8 = LLT::scalable_vector(4, s8);
+  const LLT nxv8s8 = LLT::scalable_vector(8, s8);
+
+
   using namespace TargetOpcode;
 
   getActionDefinitionsBuilder({G_ADD, G_SUB, G_AND, G_OR, G_XOR})
-      .legalFor({s32, sXLen})
+      .legalFor({s32, sXLen, nxv1s8, nxv2s8, nxv4s8, nxv8s8})
----------------
topperc wrote:

This needs to check ST.hasVInstructions()

https://github.com/llvm/llvm-project/pull/71400


More information about the llvm-commits mailing list