Fix a bug in my last X86 checkin, pointed out by cozmic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25293 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2006-01-13 20:19:44 +00:00
parent 8b0ea313d9
commit 052d2ff5dd

View File

@ -1229,7 +1229,8 @@ unsigned ISel::SelectExpr(SDOperand N) {
cast<RegisterSDNode>(Node->getOperand(1))->getReg() :
cast<RegisterSDNode>(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;
}