@@ -18928,7 +18928,7 @@ PPC::AddrMode PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
18928
18928
SDValue Op1 = N.getOperand(1);
18929
18929
int16_t Imm = Op1->getAsZExtVal();
18930
18930
if (!Align || isAligned(*Align, Imm)) {
18931
- Disp = DAG.getTargetConstant (Imm, DL, N.getValueType());
18931
+ Disp = DAG.getSignedTargetConstant (Imm, DL, N.getValueType());
18932
18932
Base = Op0;
18933
18933
if (FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(Op0)) {
18934
18934
Base = DAG.getTargetFrameIndex(FI->getIndex(), N.getValueType());
@@ -18959,7 +18959,7 @@ PPC::AddrMode PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
18959
18959
// this as "d, 0".
18960
18960
int16_t Imm;
18961
18961
if (isIntS16Immediate(CN, Imm) && (!Align || isAligned(*Align, Imm))) {
18962
- Disp = DAG.getTargetConstant (Imm, DL, CNType);
18962
+ Disp = DAG.getSignedTargetConstant (Imm, DL, CNType);
18963
18963
Base = DAG.getRegister(Subtarget.isPPC64() ? PPC::ZERO8 : PPC::ZERO,
18964
18964
CNType);
18965
18965
break;
@@ -18992,14 +18992,14 @@ PPC::AddrMode PPCTargetLowering::SelectOptimalAddrMode(const SDNode *Parent,
18992
18992
if (((Opcode == ISD::ADD) || (Opcode == ISD::OR)) &&
18993
18993
(isIntS34Immediate(N.getOperand(1), Imm34))) {
18994
18994
// N is an Add/OR Node, and it's operand is a 34-bit signed immediate.
18995
- Disp = DAG.getTargetConstant (Imm34, DL, N.getValueType());
18995
+ Disp = DAG.getSignedTargetConstant (Imm34, DL, N.getValueType());
18996
18996
if (FrameIndexSDNode *FI = dyn_cast<FrameIndexSDNode>(N.getOperand(0)))
18997
18997
Base = DAG.getTargetFrameIndex(FI->getIndex(), N.getValueType());
18998
18998
else
18999
18999
Base = N.getOperand(0);
19000
19000
} else if (isIntS34Immediate(N, Imm34)) {
19001
19001
// The address is a 34-bit signed immediate.
19002
- Disp = DAG.getTargetConstant (Imm34, DL, N.getValueType());
19002
+ Disp = DAG.getSignedTargetConstant (Imm34, DL, N.getValueType());
19003
19003
Base = DAG.getRegister(PPC::ZERO8, N.getValueType());
19004
19004
}
19005
19005
break;
0 commit comments