[A57FPLoadBalancing] Ignore <def>s when checking if a chain may be killed.
authorJames Molloy <james.molloy@arm.com>
Fri, 12 Sep 2014 16:55:26 +0000 (16:55 +0000)
committerJames Molloy <james.molloy@arm.com>
Fri, 12 Sep 2014 16:55:26 +0000 (16:55 +0000)
Defs are seen before uses, so a def without the kill flag doesn't necessarily
mean that the register is not killed on that instruction. It may be killed
in a later use operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217689 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp

index f298e118210b62e60fdb8a4b00e7af5ed23f519e..361963b962becf90e08e56dda8218a5c8d4d5e2e 100644 (file)
@@ -662,6 +662,10 @@ maybeKillChain(MachineOperand &MO, unsigned Idx,
   // determine if a chain should be ended and remove from ActiveChains.
   MachineInstr *MI = MO.getParent();
 
+  if (MO.isReg() && MO.isDef())
+    // We don't care about defs. We see them before uses, so reject them early.
+    return;
+
   if (MO.isReg()) {
 
     // If this is a KILL of a current chain, record it.