Add some debug output when -instcombine uses RAUW. This can make debug output for those cases much clearer since without this it only showed that the original instruction was removed, not what it was replaced with.

llvm-svn: 128399
This commit is contained in:
Frits van Bommel 2011-03-27 23:32:31 +00:00
parent bd6b86e489
commit d14d991bf7
1 changed files with 4 additions and 1 deletions

View File

@ -247,6 +247,9 @@ public:
if (&I == V)
V = UndefValue::get(I.getType());
DEBUG(errs() << "IC: Replacing " << I << "\n"
" with " << *V << '\n');
I.replaceAllUsesWith(V);
return &I;
}