Skip to content

Commit 5760b88

Browse files
author
Leon Clark
committed
Address comments.
1 parent 8aa6aa9 commit 5760b88

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
@@ -3759,13 +3759,13 @@ bool VectorCombine::shrinkPhiOfShuffles(Instruction &I) {
37593759
auto NewCost = TTI.getShuffleCost(Kind, InputVT, InputVT, NewMask, CostKind) +
37603760
TTI.getShuffleCost(Kind, ResultVT, InputVT, Mask1, CostKind);
37613761

3762-
if (NewCost > OldCost)
3763-
return false;
3764-
37653762
LLVM_DEBUG(dbgs() << "Found a phi of mergeable shuffles: " << I
37663763
<< "\n OldCost: " << OldCost << " vs NewCost: " << NewCost
37673764
<< "\n");
37683765

3766+
if (NewCost > OldCost)
3767+
return false;
3768+
37693769
// Create new shuffles and narrowed phi.
37703770
auto Builder = IRBuilder(Shuf);
37713771
Builder.SetCurrentDebugLocation(Shuf->getDebugLoc());

0 commit comments

Comments
 (0)