summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2011-03-08 03:06:19 +0000
committerDevang Patel <dpatel@apple.com>2011-03-08 03:06:19 +0000
commit97d0be8ee1d44dc2d5b56aacb9d843e56f76fe8a (patch)
tree63a97f64c1727479c6f88474cb3b0bd46375bb70 /llvm/lib/Transforms
parent1d5532a0d5bcfb9b92b70e3b66d224850e6becf9 (diff)
downloadbcm5719-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/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/LICM.cpp3
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.
OpenPOWER on IntegriCloud