Skip to content

Commit

Permalink
[VectorCombine] replaceValue - add "VC: Replacing" debug message to h…
Browse files Browse the repository at this point in the history
…elp the log show replacement for old/new.
  • Loading branch information
RKSimon committed Jan 2, 2025
1 parent 5ed6229 commit f739aa4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions llvm/lib/Transforms/Vectorize/VectorCombine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ class VectorCombine {
bool shrinkType(Instruction &I);

void replaceValue(Value &Old, Value &New) {
LLVM_DEBUG(dbgs() << "VC: Replacing: " << Old << '\n');
LLVM_DEBUG(dbgs() << " With: " << New << '\n');
Old.replaceAllUsesWith(&New);
if (auto *NewI = dyn_cast<Instruction>(&New)) {
New.takeName(&Old);
Expand Down

0 comments on commit f739aa4

Please sign in to comment.