summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-27 23:31:32 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-27 23:31:32 +0000
commit31af8bf1cc28f09031451260c405415e33e07d3b (patch)
tree6571f3e4de43fef0303eba3feb0a7e69a76163ef /llvm/lib
parentb5f0feabae967ab27efa82ad1a54536fc5671d22 (diff)
downloadbcm5719-llvm-31af8bf1cc28f09031451260c405415e33e07d3b.tar.gz
bcm5719-llvm-31af8bf1cc28f09031451260c405415e33e07d3b.zip
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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index eb4ffe17a1e..f45072f1ac5 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/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 <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;
OpenPOWER on IntegriCloud