From 052d2ff5dda20a7a3ff07f2829acbbb4827d7a9c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 13 Jan 2006 20:19:44 +0000 Subject: [PATCH] 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 --- lib/Target/X86/X86ISelPattern.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; }