Set debug loc for new load instruction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131481 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2011-05-17 19:43:38 +00:00
parent c9ea771cb8
commit d9b4996637

View File

@ -1576,6 +1576,9 @@ bool GVN::processNonLocalLoad(LoadInst *LI) {
if (MDNode *Tag = LI->getMetadata(LLVMContext::MD_tbaa))
NewLoad->setMetadata(LLVMContext::MD_tbaa, Tag);
// Transfer DebugLoc.
NewLoad->setDebugLoc(LI->getDebugLoc());
// Add the newly created load.
ValuesPerBlock.push_back(AvailableValueInBlock::get(UnavailablePred,
NewLoad));