summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
diff options
context:
space:
mode:
authorRoman Divacky <rdivacky@freebsd.org>2011-06-03 15:47:49 +0000
committerRoman Divacky <rdivacky@freebsd.org>2011-06-03 15:47:49 +0000
commita4a59aebd922c117e8f684f4ac31594343679504 (patch)
tree39e392bf5ed27d69b6d48d4843c65940d30c91ab /llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
parent304902141e5f5ba71cb392fab2c0203c56643753 (diff)
downloadbcm5719-llvm-a4a59aebd922c117e8f684f4ac31594343679504.tar.gz
bcm5719-llvm-a4a59aebd922c117e8f684f4ac31594343679504.zip
Fix wrong usages of CTR/MCTR where CTR8/MCTR8 was meant.
- Check for MTCTR8 in addition to MTCTR when looking up a hazard. - When lowering an indirect call use CTR8 when targeting 64bit. - Introduce BCTR8 that uses CTR8 and use it on 64bit when expanding ISD::BRIND. The last change fixes PR8487. With those changes, we are able to compile a running "ls" and "sh" on FreeBSD/PowerPC64. llvm-svn: 132552
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp b/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
index 0de5844d1c2..74ecff5af62 100644
--- a/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
+++ b/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp
@@ -233,7 +233,7 @@ void PPCHazardRecognizer970::EmitInstruction(SUnit *SU) {
unsigned Opcode = Node->getMachineOpcode();
// Update structural hazard information.
- if (Opcode == PPC::MTCTR) HasCTRSet = true;
+ if (Opcode == PPC::MTCTR || Opcode == PPC::MTCTR8) HasCTRSet = true;
// Track the address stored to.
if (isStore) {
OpenPOWER on IntegriCloud