Skip to content

Commit 5f122f6

Browse files
author
Leon Clark
committed
Fix cost analysis after rebase.
1 parent 863f10f commit 5f122f6

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3782,10 +3782,12 @@ bool VectorCombine::shrinkLoadForShuffles(Instruction &I) {
37823782
: Index);
37833783

37843784
// Update costs.
3785-
OldCost += TTI.getShuffleCost(TTI::SK_PermuteSingleSrc, OldLoadTy,
3786-
OldMask, CostKind);
3787-
NewCost += TTI.getShuffleCost(TTI::SK_PermuteSingleSrc, NewLoadTy,
3788-
NewMask, CostKind);
3785+
OldCost +=
3786+
TTI.getShuffleCost(TTI::SK_PermuteSingleSrc, Shuffle->getType(),
3787+
OldLoadTy, OldMask, CostKind);
3788+
NewCost +=
3789+
TTI.getShuffleCost(TTI::SK_PermuteSingleSrc, Shuffle->getType(),
3790+
NewLoadTy, NewMask, CostKind);
37893791
}
37903792

37913793
if (OldCost < NewCost || !NewCost.isValid())

0 commit comments

Comments
 (0)