@@ -2947,7 +2947,7 @@ void M68kTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
29472947 llvm_unreachable (" Unhandled constant constraint" );
29482948 }
29492949
2950- Result = DAG.getTargetConstant (Val, SDLoc (Op), Op.getValueType ());
2950+ Result = DAG.getSignedTargetConstant (Val, SDLoc (Op), Op.getValueType ());
29512951 break ;
29522952 }
29532953 default :
@@ -2983,7 +2983,7 @@ void M68kTargetLowering::LowerAsmOperandForConstraint(SDValue Op,
29832983 llvm_unreachable (" Unhandled constant constraint" );
29842984 }
29852985
2986- Result = DAG.getTargetConstant (Val, SDLoc (Op), Op.getValueType ());
2986+ Result = DAG.getSignedTargetConstant (Val, SDLoc (Op), Op.getValueType ());
29872987 break ;
29882988 }
29892989 default :
@@ -3415,7 +3415,7 @@ SDValue M68kTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op,
34153415 Result = DAG.getNode (ISD::SUB, DL, VT, SP, Size); // Value
34163416 if (Align > StackAlign)
34173417 Result = DAG.getNode (ISD::AND, DL, VT, Result,
3418- DAG.getConstant (-(uint64_t )Align, DL, VT));
3418+ DAG.getSignedConstant (-(uint64_t )Align, DL, VT));
34193419 Chain = DAG.getCopyToReg (Chain, DL, SPReg, Result); // Output chain
34203420 }
34213421
@@ -3442,7 +3442,7 @@ SDValue M68kTargetLowering::LowerShiftLeftParts(SDValue Op,
34423442
34433443 SDValue Zero = DAG.getConstant (0 , DL, VT);
34443444 SDValue One = DAG.getConstant (1 , DL, VT);
3445- SDValue MinusRegisterSize = DAG.getConstant (-32 , DL, VT);
3445+ SDValue MinusRegisterSize = DAG.getSignedConstant (-32 , DL, VT);
34463446 SDValue RegisterSizeMinus1 = DAG.getConstant (32 - 1 , DL, VT);
34473447 SDValue ShamtMinusRegisterSize =
34483448 DAG.getNode (ISD::ADD, DL, VT, Shamt, MinusRegisterSize);
@@ -3494,7 +3494,7 @@ SDValue M68kTargetLowering::LowerShiftRightParts(SDValue Op, SelectionDAG &DAG,
34943494
34953495 SDValue Zero = DAG.getConstant (0 , DL, VT);
34963496 SDValue One = DAG.getConstant (1 , DL, VT);
3497- SDValue MinusRegisterSize = DAG.getConstant (-32 , DL, VT);
3497+ SDValue MinusRegisterSize = DAG.getSignedConstant (-32 , DL, VT);
34983498 SDValue RegisterSizeMinus1 = DAG.getConstant (32 - 1 , DL, VT);
34993499 SDValue ShamtMinusRegisterSize =
35003500 DAG.getNode (ISD::ADD, DL, VT, Shamt, MinusRegisterSize);
0 commit comments