summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2014-09-14 18:24:26 +0000
committerJames Molloy <james.molloy@arm.com>2014-09-14 18:24:26 +0000
commit05ce999134d9358cb781c9d8e64af0688d1a1e94 (patch)
treea0577945c64f9336b0ad65cfd3d092f4a07486d8 /llvm/lib/Target
parent279ebe2ded59045640a71cf90efc25cee1ee0973 (diff)
downloadbcm5719-llvm-05ce999134d9358cb781c9d8e64af0688d1a1e94.tar.gz
bcm5719-llvm-05ce999134d9358cb781c9d8e64af0688d1a1e94.zip
[A57FPLoadBalancing] Modify r217689 - actually we do need to check defs
... Just make sure we check uses first so we see the kill first. It turns out ignoring defs gives some pretty nasty runtime failures. I'm certain this is the fix but I'm still reducing a testcase. llvm-svn: 217735
Diffstat (limited to 'llvm/lib/Target')
-rw-r--r--llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp b/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
index d8bafc16fe1..98e4bc3e923 100644
--- a/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
+++ b/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp
@@ -582,7 +582,9 @@ scanInstruction(MachineInstr *MI, unsigned Idx,
if (isMul(MI)) {
- for (auto &I : MI->operands())
+ for (auto &I : MI->uses())
+ maybeKillChain(I, Idx, ActiveChains);
+ for (auto &I : MI->defs())
maybeKillChain(I, Idx, ActiveChains);
// Create a new chain. Multiplies don't require forwarding so can go on any
@@ -644,7 +646,9 @@ scanInstruction(MachineInstr *MI, unsigned Idx,
// Non-MUL or MLA instruction. Invalidate any chain in the uses or defs
// lists.
- for (auto &I : MI->operands())
+ for (auto &I : MI->uses())
+ maybeKillChain(I, Idx, ActiveChains);
+ for (auto &I : MI->defs())
maybeKillChain(I, Idx, ActiveChains);
}
@@ -657,10 +661,6 @@ 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.
OpenPOWER on IntegriCloud