[llvm] [RISCV] Use slideup to lower build_vector when its last operand is an extraction (PR #154450)
Min-Yih Hsu via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 22 14:25:38 PDT 2025
================
@@ -4512,42 +4512,97 @@ static SDValue lowerBUILD_VECTOR(SDValue Op, SelectionDAG &DAG,
"Illegal type which will result in reserved encoding");
const unsigned Policy = RISCVVType::TAIL_AGNOSTIC | RISCVVType::MASK_AGNOSTIC;
+ auto getVSlide = [&](bool SlideUp, EVT ContainerVT, SDValue Passthru,
----------------
mshockwave wrote:
> Nit, probably better to use an explicit captures list
There is also `DL`, and I decided to capture `SlideUp` so the list becomes a bit long and I prefer using the default capture.
> I think Mask + VL can also be captured too,
Ah, I was going to do that originally but since Mask and VL were created from `auto [Mask, VL] = ...` they're considered being _bindings_ rather than variables and you cannot capture non-variables.
https://github.com/llvm/llvm-project/pull/154450
More information about the llvm-commits
mailing list