Skip debug info intrinsics.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98584 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-03-15 22:23:03 +00:00
parent d6e59084d0
commit 7b9f6b1b21

View File

@ -43,6 +43,7 @@
#include "llvm/BasicBlock.h"
#include "llvm/Constants.h"
#include "llvm/Instructions.h"
#include "llvm/IntrinsicInst.h"
#include "llvm/LLVMContext.h"
#include "llvm/Type.h"
#include "llvm/Analysis/Dominators.h"
@ -556,6 +557,9 @@ void IndVarSimplify::SinkUnusedInvariants(Loop *L) {
// dominates the exit block.
if (I->mayHaveSideEffects() || I->mayReadFromMemory())
continue;
// Skip debug info intrinsics.
if (isa<DbgInfoIntrinsic>(I))
continue;
// Don't sink static AllocaInsts out of the entry block, which would
// turn them into dynamic allocas!
if (AllocaInst *AI = dyn_cast<AllocaInst>(I))