aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/X86/X86ISelPattern.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-07-10 01:56:13 +0000
committerChris Lattner <sabre@nondot.org>2005-07-10 01:56:13 +0000
commitbce81ae51ececbd03ffdb17d56c4a1206edfc52e (patch)
tree91daf70a444cd0ce68f7af2b856cd27f412e101f /lib/Target/X86/X86ISelPattern.cpp
parent5f056bf4b862a7c31388a68711dd3b3ed5de2be8 (diff)
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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22368 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/X86/X86ISelPattern.cpp')
-rw-r--r--lib/Target/X86/X86ISelPattern.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/Target/X86/X86ISelPattern.cpp b/lib/Target/X86/X86ISelPattern.cpp
index af75bdc779..66e6f71bff 100644
--- a/lib/Target/X86/X86ISelPattern.cpp
+++ b/lib/Target/X86/X86ISelPattern.cpp
@@ -1934,7 +1934,7 @@ bool ISel::isFoldableLoad(SDOperand Op, SDOperand OtherOp, bool FloatPromoteOk){
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 @@ unsigned ISel::SelectExpr(SDOperand N) {
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 @@ unsigned ISel::SelectExpr(SDOperand N) {
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 @@ unsigned ISel::SelectExpr(SDOperand N) {
}
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 @@ unsigned ISel::SelectExpr(SDOperand N) {
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 @@ unsigned ISel::SelectExpr(SDOperand N) {
}
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;