From b4fbcbc288f89b839581eefa00289e249f167bd1 Mon Sep 17 00:00:00 2001 From: James Molloy Date: Fri, 12 Sep 2014 16:55:26 +0000 Subject: [PATCH] [A57FPLoadBalancing] Ignore s when checking if a chain may be killed. 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp b/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp index f298e118210..361963b962b 100644 --- a/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp +++ b/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp @@ -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.