summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-06-25 23:05:46 +0000
committerJim Grosbach <grosbach@apple.com>2010-06-25 23:05:46 +0000
commitc34befc78fc9f9a93ca6043814d9f8b53e1fccc3 (patch)
tree45231a4e1dbef3c60e19a125b39ee848e2cc0002 /llvm/lib
parent4530fed87eae501eb19ea5b07d84010fbf6167bf (diff)
downloadbcm5719-llvm-c34befc78fc9f9a93ca6043814d9f8b53e1fccc3.tar.gz
bcm5719-llvm-c34befc78fc9f9a93ca6043814d9f8b53e1fccc3.zip
make sure to handle dbg_value instructions in the middle of the block, not
just at the head, when doing diamond if-conversion. rdar://7797940 llvm-svn: 106907
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/IfConversion.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/IfConversion.cpp b/llvm/lib/CodeGen/IfConversion.cpp
index ea4e68dbdaf..51fea7f94e5 100644
--- a/llvm/lib/CodeGen/IfConversion.cpp
+++ b/llvm/lib/CodeGen/IfConversion.cpp
@@ -1228,10 +1228,18 @@ bool IfConverter::IfConvertDiamond(BBInfo &BBI, IfcvtKind Kind,
++DI2;
BBI1->NonPredSize -= NumDups1;
BBI2->NonPredSize -= NumDups1;
- while (NumDups1 != 0) {
+
+ // Skip past the dups on each side separately since there may be
+ // differing dbg_value entries.
+ for (unsigned i = 0; i < NumDups1; ++i) {
++DI1;
+ if (!DI1->isDebugValue())
+ ++i;
+ }
+ while (NumDups1 != 0) {
++DI2;
- --NumDups1;
+ if (!DI2->isDebugValue())
+ --NumDups1;
}
UpdatePredRedefs(BBI1->BB->begin(), DI1, Redefs, TRI);
OpenPOWER on IntegriCloud