[llvm] [RISCV] Handle fixed length vectors with exact VLEN in loweringEXTRACT_SUBVECTOR (PR #79949)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 13:06:01 PST 2024
================
@@ -9653,19 +9656,46 @@ SDValue RISCVTargetLowering::lowerEXTRACT_SUBVECTOR(SDValue Op,
return DAG.getBitcast(Op.getValueType(), Slidedown);
}
+ if (VecVT.isFixedLengthVector()) {
+ VecVT = getContainerForFixedLengthVector(VecVT);
+ Vec = convertToScalableVector(VecVT, Vec, DAG, Subtarget);
+ }
+
+ MVT ContainerSubVecVT = SubVecVT;
----------------
preames wrote:
Minor, but please move this defintion above the if guard just above, and add "ContainerSubVecVT = getContainerForFixedLengthVector(SubVecVT);" in the if clause. I found this confusing on first read through.
https://github.com/llvm/llvm-project/pull/79949
More information about the llvm-commits
mailing list