[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:42:22 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:
I presume VMV_V_X_VL is only introduced after type legalization so it's always the scalar op is always XLenVT. But for splat_vector we need to deal with non-xvlen scalar ops?
https://github.com/llvm/llvm-project/pull/87249
More information about the llvm-commits
mailing list