From: Jakob Stoklund Olesen Date: Thu, 27 Sep 2012 23:31:32 +0000 (+0000) Subject: Remove flags from partial redefinitions. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=83ef63efced9a957fe370134314645d2188c7203;p=oota-llvm.git Remove flags from partial redefinitions. The new coalescer can turn a full virtual register definition into a partial redef by merging another value into an unused vector lane. Make sure to clear the flag on such defs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164807 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/RegisterCoalescer.cpp b/lib/CodeGen/RegisterCoalescer.cpp index eb4ffe17a1e..f45072f1ac5 100644 --- a/lib/CodeGen/RegisterCoalescer.cpp +++ b/lib/CodeGen/RegisterCoalescer.cpp @@ -1732,6 +1732,12 @@ void JoinVals::pruneValues(JoinVals &Other, case CR_Replace: // This value takes precedence over the value in Other.LI. LIS->pruneValue(&Other.LI, Def, &EndPoints); + // Remove flags. This def is now a partial redef. + if (!Def.isBlock()) + for (MIOperands MO(Indexes->getInstructionFromIndex(Def)); + MO.isValid(); ++MO) + if (MO->isReg() && MO->isDef() && MO->getReg() == LI.reg) + MO->setIsUndef(false); DEBUG(dbgs() << "\t\tpruned " << PrintReg(Other.LI.reg) << " at " << Def << ": " << Other.LI << '\n'); break;