[llvm] [VectorCombine] Combine scalar fneg with insert/extract to vector fneg when length is different (PR #115209)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 15 12:35:02 PST 2024
================
@@ -665,9 +665,10 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
m_ExtractElt(m_Value(SrcVec), m_SpecificInt(Index))))))
return false;
- // TODO: We could handle this with a length-changing shuffle.
auto *VecTy = cast<FixedVectorType>(I.getType());
- if (SrcVec->getType() != VecTy)
+ auto *SrcVecTy = dyn_cast<FixedVectorType>(SrcVec->getType());
+ auto *ScalarTy = SrcVecTy->getScalarType();
----------------
ParkHanbum wrote:
it was terrible mistake. so sorry.
https://github.com/llvm/llvm-project/pull/115209
More information about the llvm-commits
mailing list