forked from OSchip/llvm-project
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
This commit is contained in:
parent
4530fed87e
commit
c34befc78f
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue