[llvm] [RISCV] Update matchSplatAsGather to convert vectors if they have different sizes (PR #117878)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 27 15:50:44 PST 2024
================
@@ -3496,21 +3496,22 @@ static SDValue matchSplatAsGather(SDValue SplatVal, MVT VT, const SDLoc &DL,
if (SplatVal.getOpcode() != ISD::EXTRACT_VECTOR_ELT)
return SDValue();
SDValue Vec = SplatVal.getOperand(0);
- // Only perform this optimization on vectors of the same size for simplicity.
// Don't perform this optimization for i1 vectors.
// FIXME: Support i1 vectors, maybe by promoting to i8?
- if (Vec.getValueType() != VT || VT.getVectorElementType() == MVT::i1)
+ if (VT.getVectorElementType() == MVT::i1)
----------------
topperc wrote:
We probably still need to make sure Vec.getValueType() and VT have the same element type?
https://github.com/llvm/llvm-project/pull/117878
More information about the llvm-commits
mailing list