mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
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
This commit is contained in:
@ -1030,7 +1030,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
||||
case ISD::ZEXTLOAD:
|
||||
case ISD::SEXTLOAD: {
|
||||
MVT::ValueType TypeBeingLoaded = (ISD::LOAD == opcode) ?
|
||||
Node->getValueType(0) : cast<MVTSDNode>(Node)->getExtraValueType();
|
||||
Node->getValueType(0) : cast<VTSDNode>(Node->getOperand(3))->getVT();
|
||||
bool sext = (ISD::SEXTLOAD == opcode);
|
||||
|
||||
// Make sure we generate both values.
|
||||
@ -1166,7 +1166,7 @@ unsigned ISel::SelectExpr(SDOperand N) {
|
||||
case ISD::SIGN_EXTEND:
|
||||
case ISD::SIGN_EXTEND_INREG:
|
||||
Tmp1 = SelectExpr(N.getOperand(0));
|
||||
switch(cast<MVTSDNode>(Node)->getExtraValueType()) {
|
||||
switch(cast<VTSDNode>(Node->getOperand(1))->getVT()) {
|
||||
default: Node->dump(); assert(0 && "Unhandled SIGN_EXTEND type"); break;
|
||||
case MVT::i32:
|
||||
BuildMI(BB, PPC::EXTSW, 1, Result).addReg(Tmp1);
|
||||
|
Reference in New Issue
Block a user