diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 2bf87c0045d..b2a68641940 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -10954,10 +10954,10 @@ Instruction *InstCombiner::visitAllocationInst(AllocationInst &AI) { InsertNewInstBefore(New, AI); // Scan to the end of the allocation instructions, to skip over a block of - // allocas if possible... + // allocas if possible...also skip interleaved debug info // BasicBlock::iterator It = New; - while (isa(*It)) ++It; + while (isa(*It) || isa(*It)) ++It; // Now that I is pointing to the first non-allocation-inst in the block, // insert our getelementptr instruction...