summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-05-17 19:43:38 +0000
committerDevang Patel <dpatel@apple.com>2011-05-17 19:43:38 +0000
commitc5933f2418fdf8ce1340fddd6225525b6aed0aa4 (patch)
tree73ae9c572368b7e6669313af7dc4d091d7df1ebe /llvm/lib/Transforms
parentc23bcbc498680c84a8a19ba3479334b5c3c9e8c9 (diff)
downloadbcm5719-llvm-c5933f2418fdf8ce1340fddd6225525b6aed0aa4.tar.gz
bcm5719-llvm-c5933f2418fdf8ce1340fddd6225525b6aed0aa4.zip
Set debug loc for new load instruction.
llvm-svn: 131481
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/GVN.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/GVN.cpp b/llvm/lib/Transforms/Scalar/GVN.cpp
index c47fae1825a..cbb030e5606 100644
--- a/llvm/lib/Transforms/Scalar/GVN.cpp
+++ b/llvm/lib/Transforms/Scalar/GVN.cpp
@@ -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));
OpenPOWER on IntegriCloud