diff options
author | Devang Patel <dpatel@apple.com> | 2011-03-08 03:06:19 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2011-03-08 03:06:19 +0000 |
commit | 97d0be8ee1d44dc2d5b56aacb9d843e56f76fe8a (patch) | |
tree | 63a97f64c1727479c6f88474cb3b0bd46375bb70 /llvm/lib | |
parent | 1d5532a0d5bcfb9b92b70e3b66d224850e6becf9 (diff) | |
download | bcm5719-llvm-97d0be8ee1d44dc2d5b56aacb9d843e56f76fe8a.tar.gz bcm5719-llvm-97d0be8ee1d44dc2d5b56aacb9d843e56f76fe8a.zip |
While sinking an instruction, do not lose llvm.dbg.value intrinsic.
llvm-svn: 127214
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 07867933d08..6cf1bd3deb5 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -445,7 +445,8 @@ void LICM::sink(Instruction &I) { // enough that we handle it as a special (more efficient) case. It is more // efficient to handle because there are no PHI nodes that need to be placed. if (ExitBlocks.size() == 1) { - if (!DT->dominates(I.getParent(), ExitBlocks[0])) { + if (!isa<DbgInfoIntrinsic>(I) && + !DT->dominates(I.getParent(), ExitBlocks[0])) { // Instruction is not used, just delete it. CurAST->deleteValue(&I); // If I has users in unreachable blocks, eliminate. |