[llvm] [RISCV] Rewrite deinterleave load as vlse optimization as DAG combine (PR #150049)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 25 10:22:50 PDT 2025
================
@@ -20764,6 +20764,54 @@ SDValue RISCVTargetLowering::PerformDAGCombine(SDNode *N,
}
break;
}
+ case RISCVISD::TUPLE_EXTRACT: {
+ EVT VT = N->getValueType(0);
+ SDValue Tuple = N->getOperand(0);
+ unsigned Idx = N->getConstantOperandVal(1);
+ if (!Tuple.hasOneUse() || Tuple.getOpcode() != ISD::INTRINSIC_W_CHAIN)
+ break;
+
+ unsigned NF = 0;
+ switch (Tuple.getConstantOperandVal(1)) {
----------------
mshockwave wrote:
non-blocking: I noticed there is a static function `getSegInstNF` in RISCVISelDAGToDAG.cpp that does the same thing, perhaps we can turn it into a shared function.
https://github.com/llvm/llvm-project/pull/150049
More information about the llvm-commits
mailing list