Skip to content

Commit 45802fe

Browse files
author
Leon Clark
committed
Address comments.
1 parent b9b8748 commit 45802fe

File tree

2 files changed

+804
-2292
lines changed

2 files changed

+804
-2292
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4062,13 +4062,13 @@ bool VectorCombine::shrinkPhiOfShuffles(Instruction &I) {
40624062
auto NewCost = TTI.getShuffleCost(Kind, InputVT, InputVT, NewMask, CostKind) +
40634063
TTI.getShuffleCost(Kind, ResultVT, InputVT, Mask1, CostKind);
40644064

4065-
if (NewCost > OldCost)
4066-
return false;
4067-
40684065
LLVM_DEBUG(dbgs() << "Found a phi of mergeable shuffles: " << I
40694066
<< "\n OldCost: " << OldCost << " vs NewCost: " << NewCost
40704067
<< "\n");
40714068

4069+
if (NewCost > OldCost)
4070+
return false;
4071+
40724072
// Create new shuffles and narrowed phi.
40734073
auto Builder = IRBuilder(Shuf);
40744074
Builder.SetCurrentDebugLocation(Shuf->getDebugLoc());

0 commit comments

Comments
 (0)