summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-02 20:06:28 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-05-02 20:06:28 +0000
commit7dffc8ecf25b3384b833f67a415ebafe123700c5 (patch)
treef6b172ef55a818ad665a0238255dbf4e173fb64f /llvm/lib/CodeGen
parent75e70e16e0e55fa6bcae3bd3d86e6c51f6c6b5c4 (diff)
downloadbcm5719-llvm-7dffc8ecf25b3384b833f67a415ebafe123700c5.tar.gz
bcm5719-llvm-7dffc8ecf25b3384b833f67a415ebafe123700c5.zip
Only ignore <undef> use operands, keep the <def,undef> ops.
Def operands may also have an <undef> flag, but that just means that a sub-register redef doesn't actually read the super-register. For physical registers, it has no meaning. llvm-svn: 130714
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/RegisterScavenging.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/RegisterScavenging.cpp b/llvm/lib/CodeGen/RegisterScavenging.cpp
index ebfe533838d..e2c25aba02e 100644
--- a/llvm/lib/CodeGen/RegisterScavenging.cpp
+++ b/llvm/lib/CodeGen/RegisterScavenging.cpp
@@ -154,13 +154,16 @@ void RegScavenger::forward() {
BitVector DeadRegs(NumPhysRegs);
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
const MachineOperand &MO = MI->getOperand(i);
- if (!MO.isReg() || MO.isUndef())
+ if (!MO.isReg())
continue;
unsigned Reg = MO.getReg();
if (!Reg || isReserved(Reg))
continue;
if (MO.isUse()) {
+ // Ignore undef uses.
+ if (MO.isUndef())
+ continue;
// Two-address operands implicitly kill.
if (!isPred && (MO.isKill() || MI->isRegTiedToDefOperand(i)))
addRegWithSubRegs(KillRegs, Reg);
OpenPOWER on IntegriCloud