mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-10 04:54:50 +00:00
Remove <def,read-undef> 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 <read-undef> flag on such defs. llvm-svn: 164807
This commit is contained in:
parent
ee6440e8ae
commit
13c6c0b45c
@ -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 <def,read-undef> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user