Skip to content

Commit f96337e

Browse files
committed
[VectorCombine] foldConcatOfBoolMasks - 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 a4f5e90 commit f96337e

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
@@ -1532,6 +1532,10 @@ bool VectorCombine::foldConcatOfBoolMasks(Instruction &I) {
15321532
if (ShAmtX > 0)
15331533
NewCost += TTI.getArithmeticInstrCost(Instruction::Shl, Ty, CostKind);
15341534

1535+
LLVM_DEBUG(dbgs() << "Found a concatenation of bitcasted bool masks: " << I
1536+
<< "\n OldCost: " << OldCost << " vs NewCost: " << NewCost
1537+
<< "\n");
1538+
15351539
if (NewCost > OldCost)
15361540
return false;
15371541

0 commit comments

Comments
 (0)