[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp
Chris Lattner
lattner at cs.uiuc.edu
Tue Jan 11 21:22:22 PST 2005
Changes in directory llvm/lib/Target/X86:
X86ISelPattern.cpp updated: 1.46 -> 1.47
---
Log message:
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.
---
Diffs of the changes: (+1 -1)
Index: llvm/lib/Target/X86/X86ISelPattern.cpp
diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.46 llvm/lib/Target/X86/X86ISelPattern.cpp:1.47
--- llvm/lib/Target/X86/X86ISelPattern.cpp:1.46 Tue Jan 11 22:29:05 2005
+++ llvm/lib/Target/X86/X86ISelPattern.cpp Tue Jan 11 23:22:07 2005
@@ -2271,7 +2271,7 @@
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;
More information about the llvm-commits
mailing list