llvm.org GIT mirror llvm / 8d50ea7
Fix a case where LSR is sensitive to debug info. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97830 91177308-0d34-0410-b5e6-96231b3b80d8 Dale Johannesen 10 years ago
1 changed file(s) with 9 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1414
1515 #include "llvm/Analysis/ScalarEvolutionExpander.h"
1616 #include "llvm/Analysis/LoopInfo.h"
17 #include "llvm/IntrinsicInst.h"
1718 #include "llvm/LLVMContext.h"
1819 #include "llvm/Target/TargetData.h"
1920 #include "llvm/ADT/STLExtras.h"
136137 if (IP != BlockBegin) {
137138 --IP;
138139 for (; ScanLimit; --IP, --ScanLimit) {
140 // Don't count dbg.value against the ScanLimit, to avoid perturbing the
141 // generated code.
142 if (isa(IP))
143 ScanLimit++;
139144 if (IP->getOpcode() == (unsigned)Opcode && IP->getOperand(0) == LHS &&
140145 IP->getOperand(1) == RHS)
141146 return IP;
504509 if (IP != BlockBegin) {
505510 --IP;
506511 for (; ScanLimit; --IP, --ScanLimit) {
512 // Don't count dbg.value against the ScanLimit, to avoid perturbing the
513 // generated code.
514 if (isa(IP))
515 ScanLimit++;
507516 if (IP->getOpcode() == Instruction::GetElementPtr &&
508517 IP->getOperand(0) == V && IP->getOperand(1) == Idx)
509518 return IP;