Skip to content

Commit c543480

Browse files
committed
[VectorCombine] foldInsExtVectorToShuffle - add debug message for match + cost-comparison
Helps with debugging to show to that the fold found the match, and shows the old + new costs to indicate whether the fold was/wasn't profitable.
1 parent a9034d0 commit c543480

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3003,6 +3003,10 @@ bool VectorCombine::foldInsExtVectorToShuffle(Instruction &I) {
30033003
if (!Ext->hasOneUse())
30043004
NewCost += TTI.getVectorInstrCost(*Ext, VecTy, CostKind, ExtIdx);
30053005

3006+
LLVM_DEBUG(dbgs() << "Found a insert/extract shuffle-like pair : " << I
3007+
<< "\n OldCost: " << OldCost << " vs NewCost: " << NewCost
3008+
<< "\n");
3009+
30063010
if (OldCost < NewCost)
30073011
return false;
30083012

0 commit comments

Comments
 (0)