Skip to content

Commit 8f4d2e0

Browse files
committed
[VectorCombine] scalarizeLoadExtract - 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 f611e95 commit 8f4d2e0

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

llvm/lib/Transforms/Vectorize/VectorCombine.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -1612,6 +1612,10 @@ bool VectorCombine::scalarizeLoadExtract(Instruction &I) {
16121612
ScalarizedCost += TTI.getAddressComputationCost(VecTy->getElementType());
16131613
}
16141614

1615+
LLVM_DEBUG(dbgs() << "Found all extractions of a vector load: " << I
1616+
<< "\n LoadExtractCost: " << OriginalCost
1617+
<< " vs ScalarizedCost: " << ScalarizedCost << "\n");
1618+
16151619
if (ScalarizedCost >= OriginalCost)
16161620
return false;
16171621

0 commit comments

Comments
 (0)