@@ -2486,8 +2486,8 @@ bool NVPTXDAGToDAGISel::SelectADDRsi_imp(SDNode *OpNode, SDValue Addr,
24862486 if (ConstantSDNode *CN = dyn_cast<ConstantSDNode>(Addr.getOperand (1 ))) {
24872487 SDValue base = Addr.getOperand (0 );
24882488 if (SelectDirectAddr (base, Base)) {
2489- Offset = CurDAG-> getTargetConstant (CN-> getZExtValue (), SDLoc (OpNode),
2490- mvt );
2489+ Offset =
2490+ CurDAG-> getTargetConstant (CN-> getZExtValue (), SDLoc (OpNode), VT );
24912491 return true ;
24922492 }
24932493 }
@@ -2512,8 +2512,8 @@ bool NVPTXDAGToDAGISel::SelectADDRri_imp(SDNode *OpNode, SDValue Addr,
25122512 SDValue &Base, SDValue &Offset,
25132513 MVT VT) {
25142514 if (FrameIndexSDNode *FIN = dyn_cast<FrameIndexSDNode>(Addr)) {
2515- Base = CurDAG->getTargetFrameIndex (FIN->getIndex (), mvt );
2516- Offset = CurDAG->getTargetConstant (0 , SDLoc (OpNode), mvt );
2515+ Base = CurDAG->getTargetFrameIndex (FIN->getIndex (), VT );
2516+ Offset = CurDAG->getTargetConstant (0 , SDLoc (OpNode), VT );
25172517 return true ;
25182518 }
25192519 if (Addr.getOpcode () == ISD::TargetExternalSymbol ||
@@ -2528,7 +2528,7 @@ bool NVPTXDAGToDAGISel::SelectADDRri_imp(SDNode *OpNode, SDValue Addr,
25282528 if (FrameIndexSDNode *FIN =
25292529 dyn_cast<FrameIndexSDNode>(Addr.getOperand (0 )))
25302530 // Constant offset from frame ref.
2531- Base = CurDAG->getTargetFrameIndex (FIN->getIndex (), mvt );
2531+ Base = CurDAG->getTargetFrameIndex (FIN->getIndex (), VT );
25322532 else
25332533 Base = Addr.getOperand (0 );
25342534
0 commit comments