improve comment.

llvm-svn: 130426
This commit is contained in:
Chris Lattner 2011-04-28 20:02:57 +00:00
parent 18470e3287
commit a5452c0d67
1 changed files with 6 additions and 1 deletions

View File

@ -969,8 +969,13 @@ static Value *GetLoadValueForLoad(LoadInst *SrcVal, unsigned Offset,
NewLoadSize*8-SrcVal->getType()->getPrimitiveSizeInBits());
RV = Builder.CreateTrunc(RV, SrcVal->getType());
SrcVal->replaceAllUsesWith(RV);
// We would like to use gvn.markInstructionForDeletion here, but we can't
// because the load is already memoized into the leader map table that GVN
// tracks. It is potentially possible to remove the load from the table,
// but then there all of the operations based on it would need to be
// rehashed. Just leave the dead load around.
gvn.getMemDep().removeInstruction(SrcVal);
//gvn.markInstructionForDeletion(SrcVal);
SrcVal = NewLoad;
}