diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp index c5d5a26666f..678e1829aff 100644 --- a/lib/Target/X86/X86ISelPattern.cpp +++ b/lib/Target/X86/X86ISelPattern.cpp @@ -1229,7 +1229,8 @@ unsigned ISel::SelectExpr(SDOperand N) { cast(Node->getOperand(1))->getReg() : cast(Node)->getReg(); // Just use the specified register as our input if we can. - if (MRegisterInfo::isVirtualRegister(Reg)) + if (Node->getOpcode() == ISD::Register || + MRegisterInfo::isVirtualRegister(Reg)) return Reg; }