[llvm] [VectorCombine] vectorizeLoadInsert - fix shuffle when inserting into non-poison undef value (PR #119906)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 13 09:49:13 PST 2024
================
@@ -179,7 +179,9 @@ bool VectorCombine::vectorizeLoadInsert(Instruction &I) {
// Match insert into fixed vector of scalar value.
// TODO: Handle non-zero insert index.
Value *Scalar;
- if (!match(&I, m_InsertElt(m_Undef(), m_Value(Scalar), m_ZeroInt())) ||
+ UndefValue *BaseVec;
+ if (!match(&I, m_InsertElt(m_UndefValue(BaseVec), m_Value(Scalar),
+ m_ZeroInt())) ||
----------------
RKSimon wrote:
OK - I'll simplify the fold to just handle m_Poison
https://github.com/llvm/llvm-project/pull/119906
More information about the llvm-commits
mailing list