[llvm] f96337e - [VectorCombine] foldConcatOfBoolMasks - add debug message for match + cost-comparison
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sun Dec 22 08:21:30 PST 2024
Author: Simon Pilgrim
Date: 2024-12-22T16:21:02Z
New Revision: f96337e04e0290426c72637325424a8be8e8de5d
URL: https://github.com/llvm/llvm-project/commit/f96337e04e0290426c72637325424a8be8e8de5d
DIFF: https://github.com/llvm/llvm-project/commit/f96337e04e0290426c72637325424a8be8e8de5d.diff
LOG: [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.
Added:
Modified:
llvm/lib/Transforms/Vectorize/VectorCombine.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
index 1e39f9d7be1dc5..b7956e037ad4b1 100644
--- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
+++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp
@@ -1532,6 +1532,10 @@ bool VectorCombine::foldConcatOfBoolMasks(Instruction &I) {
if (ShAmtX > 0)
NewCost += TTI.getArithmeticInstrCost(Instruction::Shl, Ty, CostKind);
+ LLVM_DEBUG(dbgs() << "Found a concatenation of bitcasted bool masks: " << I
+ << "\n OldCost: " << OldCost << " vs NewCost: " << NewCost
+ << "\n");
+
if (NewCost > OldCost)
return false;
More information about the llvm-commits
mailing list