diff --git a/lib/Target/PowerPC/PPC32ISelPattern.cpp b/lib/Target/PowerPC/PPC32ISelPattern.cpp index 750161caf8a..5b4c6e58d5c 100644 --- a/lib/Target/PowerPC/PPC32ISelPattern.cpp +++ b/lib/Target/PowerPC/PPC32ISelPattern.cpp @@ -1572,6 +1572,11 @@ unsigned ISel::SelectExpr(SDOperand N, bool Recording) { SDNode *Node = N.Val; MVT::ValueType DestType = N.getValueType(); + if (Node->getOpcode() == ISD::CopyFromReg && + MRegisterInfo::isVirtualRegister(cast(Node)->getReg())) + // Just use the specified register as our input. + return cast(Node)->getReg(); + unsigned &Reg = ExprMap[N]; if (Reg) return Reg;