[llvm-commits] [llvm] r106907 - /llvm/trunk/lib/CodeGen/IfConversion.cpp
Jim Grosbach
grosbach at apple.com
Fri Jun 25 16:05:46 PDT 2010
Author: grosbach
Date: Fri Jun 25 18:05:46 2010
New Revision: 106907
URL: http://llvm.org/viewvc/llvm-project?rev=106907&view=rev
Log:
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
Modified:
llvm/trunk/lib/CodeGen/IfConversion.cpp
Modified: llvm/trunk/lib/CodeGen/IfConversion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/IfConversion.cpp?rev=106907&r1=106906&r2=106907&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/IfConversion.cpp (original)
+++ llvm/trunk/lib/CodeGen/IfConversion.cpp Fri Jun 25 18:05:46 2010
@@ -1228,10 +1228,18 @@
++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);
More information about the llvm-commits
mailing list