diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2015-12-25 14:25:49 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2015-12-25 14:25:49 +0000 |
| commit | 2fe5752e3a7c345cdb59e869278d36af33c13fa4 (patch) | |
| tree | df68ca4b788599e14cbadaf19b704672393efccd /lib/Transforms/Scalar | |
| parent | 69156b4c20249e7800cc09e0eef0beb3d15ac1ad (diff) | |
Notes
Diffstat (limited to 'lib/Transforms/Scalar')
| -rw-r--r-- | lib/Transforms/Scalar/GVN.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Transforms/Scalar/GVN.cpp b/lib/Transforms/Scalar/GVN.cpp index d1eba6e70e57..89a0d0af93be 100644 --- a/lib/Transforms/Scalar/GVN.cpp +++ b/lib/Transforms/Scalar/GVN.cpp @@ -1761,7 +1761,8 @@ bool GVN::processNonLocalLoad(LoadInst *LI) { if (isa<PHINode>(V)) V->takeName(LI); if (Instruction *I = dyn_cast<Instruction>(V)) - I->setDebugLoc(LI->getDebugLoc()); + if (LI->getDebugLoc()) + I->setDebugLoc(LI->getDebugLoc()); if (V->getType()->getScalarType()->isPointerTy()) MD->invalidateCachedPointerInfo(V); markInstructionForDeletion(LI); |
