aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-01-13 20:19:44 +0000
committerChris Lattner <sabre@nondot.org>2006-01-13 20:19:44 +0000
commit052d2ff5dda20a7a3ff07f2829acbbb4827d7a9c (patch)
treed0835574894ad299e0a1b0d8c94892aa06d36dff
parent8b0ea313d9cdbb43154b52a004ea4a1dfa43a0b5 (diff)
downloadexternal_llvm-052d2ff5dda20a7a3ff07f2829acbbb4827d7a9c.zip
external_llvm-052d2ff5dda20a7a3ff07f2829acbbb4827d7a9c.tar.gz
external_llvm-052d2ff5dda20a7a3ff07f2829acbbb4827d7a9c.tar.bz2
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
-rw-r--r--lib/Target/X86/X86ISelPattern.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp
index c5d5a26..678e182 100644
--- a/lib/Target/X86/X86ISelPattern.cpp
+++ b/lib/Target/X86/X86ISelPattern.cpp
@@ -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;
}