summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2009-03-04 01:20:34 +0000
committerDale Johannesen <dalej@apple.com>2009-03-04 01:20:34 +0000
commit0365d3b8b566dea07c554e0aa28a2fbc683ddd5a (patch)
tree50fbc0765ba983412cb0bda4aa955182134536ac /llvm/lib
parent159d2159eeb754962d97c1b0e5164b6fb60f191a (diff)
downloadbcm5719-llvm-0365d3b8b566dea07c554e0aa28a2fbc683ddd5a.tar.gz
bcm5719-llvm-0365d3b8b566dea07c554e0aa28a2fbc683ddd5a.zip
Make my earlier patch to skip debug intrinsics
when counting work; it was only off by 1. llvm-svn: 65993
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/InstructionCombining.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
index 8f094b747c1..5b50ab56a3e 100644
--- a/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/Scalar/InstructionCombining.cpp
@@ -11483,6 +11483,7 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) {
BasicBlock::iterator BBI = &SI;
for (unsigned ScanInsts = 6; BBI != SI.getParent()->begin() && ScanInsts;
--ScanInsts) {
+ --BBI;
// Don't count debug info directives, lest they affect codegen.
// Likewise, we skip bitcasts that feed into a llvm.dbg.declare; these are
// not present when debugging is off.
@@ -11490,10 +11491,8 @@ Instruction *InstCombiner::visitStoreInst(StoreInst &SI) {
(isa<BitCastInst>(BBI) && BBI->hasOneUse() &&
isa<DbgDeclareInst>(BBI->use_begin()))) {
ScanInsts++;
- --BBI;
continue;
}
- --BBI;
if (StoreInst *PrevSI = dyn_cast<StoreInst>(BBI)) {
// Prev store isn't volatile, and stores to the same location?
OpenPOWER on IntegriCloud