1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

Do not move DBG_VALUE in middle of PHI nodes.

llvm-svn: 132161
This commit is contained in:
Devang Patel 2011-05-26 22:43:14 +00:00
parent 52e803e053
commit c67e8c5d45

View File

@ -557,7 +557,10 @@ bool CodeGenPrepare::OptimizeCallInst(CallInst *CI) {
if (DVI->getParent() != VI->getParent() || DT->dominates(DVI, VI)) {
DEBUG(dbgs() << "Moving Debug Value before :\n" << *DVI << ' ' << *VI);
DVI->removeFromParent();
DVI->insertAfter(VI);
if (isa<PHINode>(VI))
DVI->insertBefore(VI->getParent()->getFirstNonPHI());
else
DVI->insertAfter(VI);
return true;
}