From: Chris Lattner Date: Thu, 28 Jul 2005 05:23:43 +0000 (+0000) Subject: Eliminate an extra copy from R1 that Nate noticed on function calls that X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=988b1dd608ed596879e29ad27d4aafdbf3a8f1ac;p=oota-llvm.git Eliminate an extra copy from R1 that Nate noticed on function calls that have to write arguments to the stack git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22536 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCISelPattern.cpp b/lib/Target/PowerPC/PPCISelPattern.cpp index efdb8b5b289..c544e4d7fd0 100644 --- a/lib/Target/PowerPC/PPCISelPattern.cpp +++ b/lib/Target/PowerPC/PPCISelPattern.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();