From 5d02e3a15ef16dcea40e9f991582bf30d68f8eba Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 28 Jul 2005 05:23:43 +0000 Subject: [PATCH] Eliminate an extra copy from R1 that Nate noticed on function calls that have to write arguments to the stack llvm-svn: 22536 --- lib/Target/PowerPC/PPC32ISelPattern.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/Target/PowerPC/PPC32ISelPattern.cpp b/lib/Target/PowerPC/PPC32ISelPattern.cpp index efdb8b5b289..c544e4d7fd0 100644 --- a/lib/Target/PowerPC/PPC32ISelPattern.cpp +++ b/lib/Target/PowerPC/PPC32ISelPattern.cpp @@ -1293,7 +1293,8 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) { MVT::ValueType DestType = N.getValueType(); if (Node->getOpcode() == ISD::CopyFromReg && - MRegisterInfo::isVirtualRegister(cast(Node)->getReg())) + (MRegisterInfo::isVirtualRegister(cast(Node)->getReg()) || + cast(Node)->getReg() == PPC::R1)) // Just use the specified register as our input. return cast(Node)->getReg();