[llvm] [PowerPC] Fix vector_shuffle combines when inputs are scalar_to_vector of differing types. (PR #80784)
Maryam Moghadas via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 24 07:51:47 PDT 2024
================
@@ -15519,33 +15556,33 @@ SDValue PPCTargetLowering::combineVectorShuffle(ShuffleVectorSDNode *SVN,
// the value into element zero. Since scalar size of LHS and RHS may differ
// after isScalarToVec, this should be checked using their own sizes.
if (SToVLHS) {
- if (!IsLittleEndian && SToVLHS.getValueType().getScalarSizeInBits() >= 64)
+ int LHSScalarSize = SToVLHS.getValueType().getScalarSizeInBits();
+ if (!IsLittleEndian && LHSScalarSize >= 64)
return Res;
- // Set up the values for the shuffle vector fixup.
- LHSMaxIdx = NumEltsOut / NumEltsIn;
- SToVLHS = getSToVPermuted(SToVLHS, DAG, Subtarget);
- if (SToVLHS.getValueType() != LHS.getValueType())
- SToVLHS = DAG.getBitcast(LHS.getValueType(), SToVLHS);
- LHS = SToVLHS;
+ LHS = generateSToVPermutedForVecShuffle(
+ LHSScalarSize, ShuffleEltWidth, LHSNumValidElts, LHSFirstElt,
----------------
maryammo wrote:
It seems LHSFirstElt is always 0, if that is the case, why it is being passed as a parameter?
https://github.com/llvm/llvm-project/pull/80784
More information about the llvm-commits
mailing list