summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-01-12 05:22:07 +0000
committerChris Lattner <sabre@nondot.org>2005-01-12 05:22:07 +0000
commitdb4b67c81e120fef4fa44e247efe11234934b126 (patch)
treec1c83dc1df1a84f674531648f188809b66fc5448 /llvm/lib
parentbdb2e9dabcb3564947d8e20aec93cc820e4fec93 (diff)
downloadbcm5719-llvm-db4b67c81e120fef4fa44e247efe11234934b126.tar.gz
bcm5719-llvm-db4b67c81e120fef4fa44e247efe11234934b126.zip
Do not use the type of the RHS constant to determine the type of the operation.
This fails for shifts because the constant is always 8 bits. llvm-svn: 19508
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86ISelPattern.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Target/X86/X86ISelPattern.cpp b/llvm/lib/Target/X86/X86ISelPattern.cpp
index 35796e9e60f..a796045c5b5 100644
--- a/llvm/lib/Target/X86/X86ISelPattern.cpp
+++ b/llvm/lib/Target/X86/X86ISelPattern.cpp
@@ -2271,7 +2271,7 @@ void ISel::Select(SDOperand N) {
SDOperand Op0 = Op.getOperand(0);
SDOperand Op1 = Op.getOperand(1);
if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Op1)) {
- switch (CN->getValueType(0)) {
+ switch (Op0.getValueType()) { // Use Op0's type because of shifts.
default: break;
case MVT::i1:
case MVT::i8: Opc = TabPtr[0]; break;
OpenPOWER on IntegriCloud