Skip to content

Commit 869797d

Browse files
committed
[VectorCombine] Add a debug message for foldShuffleOfCastop. NFC
This optimization, much like the existing foldShuffleOfBinops can cause a lot of regressions. Add a quick debug message to make the costs are more obvious.
1 parent a2c4b7c commit 869797d

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
@@ -1485,6 +1485,10 @@ bool VectorCombine::foldShuffleOfCastops(Instruction &I) {
14851485
TargetTransformInfo::SK_PermuteTwoSrc, CastSrcTy, Mask, CostKind);
14861486
NewCost += TTI.getCastInstrCost(Opcode, ShuffleDstTy, NewShuffleDstTy,
14871487
TTI::CastContextHint::None, CostKind);
1488+
1489+
LLVM_DEBUG(dbgs() << "Found a shuffle feeding two casts: " << I
1490+
<< "\n OldCost: " << OldCost << " vs NewCost: " << NewCost
1491+
<< "\n");
14881492
if (NewCost > OldCost)
14891493
return false;
14901494

0 commit comments

Comments
 (0)