From b21991c4f5a64a4c0105e747c36b3bbb40dbd69a Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Mon, 15 Mar 2010 21:25:29 +0000 Subject: [PATCH] Skip debug info intrinsics. llvm-svn: 98581 --- llvm/lib/Transforms/Utils/LoopSimplify.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp index 584ec143669f..1ef3c32ae58f 100644 --- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp +++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp @@ -41,6 +41,7 @@ #include "llvm/Transforms/Scalar.h" #include "llvm/Constants.h" #include "llvm/Instructions.h" +#include "llvm/IntrinsicInst.h" #include "llvm/Function.h" #include "llvm/LLVMContext.h" #include "llvm/Type.h" @@ -290,6 +291,9 @@ ReprocessLoop: bool AllInvariant = true; for (BasicBlock::iterator I = ExitingBlock->begin(); &*I != BI; ) { Instruction *Inst = I++; + // Skip debug info intrinsics. + if (isa(Inst)) + continue; if (Inst == CI) continue; if (!L->makeLoopInvariant(Inst, Changed,