[llvm] [RISCV] Use vwadd.vx for splat vector with extension (PR #87249)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 8 00:38:49 PDT 2024


================
@@ -13598,14 +13598,26 @@ struct NodeExtensionHelper {
     case RISCVISD::VZEXT_VL:
     case RISCVISD::FP_EXTEND_VL:
       return OrigOperand.getOperand(0);
+    case ISD::SPLAT_VECTOR: {
+      SDValue Op = OrigOperand.getOperand(0);
+      unsigned Opc = Op.getOpcode();
+      if (SupportsSExt && Opc == ISD::SIGN_EXTEND_INREG)
+        return Op.getOperand(0);
+
+      if (SupportsZExt && Opc == ISD::AND)
+        return Op.getOperand(0);
----------------
lukel97 wrote:

How come we don't need to do this for VMV_V_X_VL though?

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


More information about the llvm-commits mailing list