Skip to content

Commit 87f432c

Browse files
committed
Apply the modified shufflecost parameter
1 parent 6e08857 commit 87f432c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
743743

744744
InstructionCost NewCost =
745745
TTI.getArithmeticInstrCost(Instruction::FNeg, SrcVecTy, CostKind) +
746-
TTI.getShuffleCost(TargetTransformInfo::SK_PermuteTwoSrc, DstVecTy, Mask,
746+
TTI.getShuffleCost(TargetTransformInfo::SK_PermuteTwoSrc, DstVecTy, DstVecTy, Mask,
747747
CostKind);
748748

749749
bool NeedLenChg = SrcVecTy->getNumElements() != NumDstElts;
@@ -754,7 +754,7 @@ bool VectorCombine::foldInsExtFNeg(Instruction &I) {
754754
SrcMask.assign(NumDstElts, PoisonMaskElem);
755755
SrcMask[ExtIdx % NumDstElts] = ExtIdx;
756756
NewCost += TTI.getShuffleCost(TargetTransformInfo::SK_PermuteSingleSrc,
757-
VecTy, SrcVecTy, SrcMask, CostKind);
757+
DstVecTy, SrcVecTy, SrcMask, CostKind);
758758
}
759759

760760
LLVM_DEBUG(dbgs() << "Found an insertion of (extract)fneg : " << I

0 commit comments

Comments
 (0)