[llvm-commits] CVS: llvm/lib/Target/X86/X86ISelPattern.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jul 9 18:56:25 PDT 2005
Changes in directory llvm/lib/Target/X86:
X86ISelPattern.cpp updated: 1.148 -> 1.149
---
Log message:
Change *EXTLOAD to use an VTSDNode operand instead of being an MVTSDNode.
This is the last MVTSDNode.
This allows us to eliminate a bunch of special case code for handling
MVTSDNodes.
Also, remove some uses of dyn_cast that should really be cast (which is
cheaper in a release build).
---
Diffs of the changes: (+8 -8)
X86ISelPattern.cpp | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
Index: llvm/lib/Target/X86/X86ISelPattern.cpp
diff -u llvm/lib/Target/X86/X86ISelPattern.cpp:1.148 llvm/lib/Target/X86/X86ISelPattern.cpp:1.149
--- llvm/lib/Target/X86/X86ISelPattern.cpp:1.148 Sat Jul 9 19:29:18 2005
+++ llvm/lib/Target/X86/X86ISelPattern.cpp Sat Jul 9 20:56:13 2005
@@ -1934,7 +1934,7 @@
if (isa<ConstantPoolSDNode>(Op.getOperand(1)))
return false;
} else if (FloatPromoteOk && Op.getOpcode() == ISD::EXTLOAD &&
- cast<MVTSDNode>(Op)->getExtraValueType() == MVT::f32) {
+ cast<VTSDNode>(Op.getOperand(3))->getVT() == MVT::f32) {
// FIXME: currently can't fold constant pool indexes.
if (isa<ConstantPoolSDNode>(Op.getOperand(1)))
return false;
@@ -3377,7 +3377,7 @@
if (ConstantPoolSDNode *CP = dyn_cast<ConstantPoolSDNode>(N.getOperand(1)))
if (Node->getValueType(0) == MVT::f64) {
- assert(cast<MVTSDNode>(Node)->getExtraValueType() == MVT::f32 &&
+ assert(cast<VTSDNode>(Node->getOperand(3))->getVT() == MVT::f32 &&
"Bad EXTLOAD!");
addConstantPoolReference(BuildMI(BB, X86::FLD32m, 4, Result),
CP->getIndex());
@@ -3397,12 +3397,12 @@
switch (Node->getValueType(0)) {
default: assert(0 && "Unknown type to sign extend to.");
case MVT::f64:
- assert(cast<MVTSDNode>(Node)->getExtraValueType() == MVT::f32 &&
+ assert(cast<VTSDNode>(Node->getOperand(3))->getVT() == MVT::f32 &&
"Bad EXTLOAD!");
addFullAddress(BuildMI(BB, X86::FLD32m, 5, Result), AM);
break;
case MVT::i32:
- switch (cast<MVTSDNode>(Node)->getExtraValueType()) {
+ switch (cast<VTSDNode>(Node->getOperand(3))->getVT()) {
default:
assert(0 && "Bad zero extend!");
case MVT::i1:
@@ -3415,12 +3415,12 @@
}
break;
case MVT::i16:
- assert(cast<MVTSDNode>(Node)->getExtraValueType() <= MVT::i8 &&
+ assert(cast<VTSDNode>(Node->getOperand(3))->getVT() <= MVT::i8 &&
"Bad zero extend!");
addFullAddress(BuildMI(BB, X86::MOVSX16rm8, 5, Result), AM);
break;
case MVT::i8:
- assert(cast<MVTSDNode>(Node)->getExtraValueType() == MVT::i1 &&
+ assert(cast<VTSDNode>(Node->getOperand(3))->getVT() == MVT::i1 &&
"Bad zero extend!");
addFullAddress(BuildMI(BB, X86::MOV8rm, 5, Result), AM);
break;
@@ -3448,7 +3448,7 @@
case MVT::i8: assert(0 && "Cannot sign extend from bool!");
default: assert(0 && "Unknown type to sign extend to.");
case MVT::i32:
- switch (cast<MVTSDNode>(Node)->getExtraValueType()) {
+ switch (cast<VTSDNode>(Node->getOperand(3))->getVT()) {
default:
case MVT::i1: assert(0 && "Cannot sign extend from bool!");
case MVT::i8:
@@ -3460,7 +3460,7 @@
}
break;
case MVT::i16:
- assert(cast<MVTSDNode>(Node)->getExtraValueType() == MVT::i8 &&
+ assert(cast<VTSDNode>(Node->getOperand(3))->getVT() == MVT::i8 &&
"Cannot sign extend from bool!");
addFullAddress(BuildMI(BB, X86::MOVSX16rm8, 5, Result), AM);
break;
More information about the llvm-commits
mailing list