@@ -1444,15 +1444,15 @@ void SystemZTargetLowering::LowerAsmOperandForConstraint(
1444
1444
case ' K' : // Signed 16-bit constant
1445
1445
if (auto *C = dyn_cast<ConstantSDNode>(Op))
1446
1446
if (isInt<16 >(C->getSExtValue ()))
1447
- Ops.push_back (DAG.getTargetConstant (C-> getSExtValue (), SDLoc (Op),
1448
- Op.getValueType ()));
1447
+ Ops.push_back (DAG.getSignedTargetConstant (
1448
+ C-> getSExtValue (), SDLoc (Op), Op.getValueType ()));
1449
1449
return ;
1450
1450
1451
1451
case ' L' : // Signed 20-bit displacement (on all targets we support)
1452
1452
if (auto *C = dyn_cast<ConstantSDNode>(Op))
1453
1453
if (isInt<20 >(C->getSExtValue ()))
1454
- Ops.push_back (DAG.getTargetConstant (C-> getSExtValue (), SDLoc (Op),
1455
- Op.getValueType ()));
1454
+ Ops.push_back (DAG.getSignedTargetConstant (
1455
+ C-> getSExtValue (), SDLoc (Op), Op.getValueType ()));
1456
1456
return ;
1457
1457
1458
1458
case ' M' : // 0x7fffffff
@@ -2578,7 +2578,7 @@ static void adjustSubwordCmp(SelectionDAG &DAG, const SDLoc &DL,
2578
2578
// Make sure that the second operand is an i32 with the right value.
2579
2579
if (C.Op1 .getValueType () != MVT::i32 ||
2580
2580
Value != ConstOp1->getZExtValue ())
2581
- C.Op1 = DAG.getConstant (Value, DL, MVT::i32 );
2581
+ C.Op1 = DAG.getConstant (( uint32_t ) Value, DL, MVT::i32 );
2582
2582
}
2583
2583
2584
2584
// Return true if Op is either an unextended load, or a load suitable
@@ -3410,7 +3410,7 @@ SDValue SystemZTargetLowering::lowerVectorSETCC(SelectionDAG &DAG,
3410
3410
}
3411
3411
if (Invert) {
3412
3412
SDValue Mask =
3413
- DAG.getSplatBuildVector (VT, DL, DAG.getConstant (- 1 , DL, MVT::i64 ));
3413
+ DAG.getSplatBuildVector (VT, DL, DAG.getAllOnesConstant ( DL, MVT::i64 ));
3414
3414
Cmp = DAG.getNode (ISD::XOR, DL, VT, Cmp, Mask);
3415
3415
}
3416
3416
if (Chain && Chain.getNode () != Cmp.getNode ()) {
@@ -3571,7 +3571,7 @@ SDValue SystemZTargetLowering::lowerGlobalAddress(GlobalAddressSDNode *Node,
3571
3571
// addition for it.
3572
3572
if (Offset != 0 )
3573
3573
Result = DAG.getNode (ISD::ADD, DL, PtrVT, Result,
3574
- DAG.getConstant (Offset, DL, PtrVT));
3574
+ DAG.getSignedConstant (Offset, DL, PtrVT));
3575
3575
3576
3576
return Result;
3577
3577
}
@@ -3834,7 +3834,7 @@ SDValue SystemZTargetLowering::lowerRETURNADDR(SDValue Op,
3834
3834
const auto *TFL = Subtarget.getFrameLowering <SystemZFrameLowering>();
3835
3835
int Offset = TFL->getReturnAddressOffset (MF);
3836
3836
SDValue Ptr = DAG.getNode (ISD::ADD, DL, PtrVT, FrameAddr,
3837
- DAG.getConstant (Offset, DL, PtrVT));
3837
+ DAG.getSignedConstant (Offset, DL, PtrVT));
3838
3838
return DAG.getLoad (PtrVT, DL, DAG.getEntryNode (), Ptr,
3839
3839
MachinePointerInfo ());
3840
3840
}
@@ -4584,7 +4584,7 @@ static void getCSAddressAndShifts(SDValue Addr, SelectionDAG &DAG, SDLoc DL,
4584
4584
4585
4585
// Get the address of the containing word.
4586
4586
AlignedAddr = DAG.getNode (ISD::AND, DL, PtrVT, Addr,
4587
- DAG.getConstant (-4 , DL, PtrVT));
4587
+ DAG.getSignedConstant (-4 , DL, PtrVT));
4588
4588
4589
4589
// Get the number of bits that the word must be rotated left in order
4590
4590
// to bring the field to the top bits of a GR32.
@@ -4623,7 +4623,8 @@ SDValue SystemZTargetLowering::lowerATOMIC_LOAD_OP(SDValue Op,
4623
4623
if (Opcode == SystemZISD::ATOMIC_LOADW_SUB)
4624
4624
if (auto *Const = dyn_cast<ConstantSDNode>(Src2)) {
4625
4625
Opcode = SystemZISD::ATOMIC_LOADW_ADD;
4626
- Src2 = DAG.getConstant (-Const->getSExtValue (), DL, Src2.getValueType ());
4626
+ Src2 = DAG.getSignedConstant (-Const->getSExtValue (), DL,
4627
+ Src2.getValueType ());
4627
4628
}
4628
4629
4629
4630
SDValue AlignedAddr, BitShift, NegBitShift;
0 commit comments