mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
Fix signedness of constant. NFC.
llvm-svn: 303980
This commit is contained in:
parent
8ee5db7bb2
commit
f6a68a8085
@ -9222,14 +9222,14 @@ static SDValue splitStoreSplat(SelectionDAG &DAG, StoreSDNode &St,
|
||||
// instructions (stp).
|
||||
SDLoc DL(&St);
|
||||
SDValue BasePtr = St.getBasePtr();
|
||||
int64_t BaseOffset = 0;
|
||||
uint64_t BaseOffset = 0;
|
||||
|
||||
const MachinePointerInfo &PtrInfo = St.getPointerInfo();
|
||||
SDValue NewST1 =
|
||||
DAG.getStore(St.getChain(), DL, SplatVal, BasePtr, PtrInfo,
|
||||
OrigAlignment, St.getMemOperand()->getFlags());
|
||||
|
||||
// As this in ISel, we will not merge this add which may degrate results.
|
||||
// As this in ISel, we will not merge this add which may degrade results.
|
||||
if (BasePtr->getOpcode() == ISD::ADD &&
|
||||
isa<ConstantSDNode>(BasePtr->getOperand(1))) {
|
||||
BaseOffset = cast<ConstantSDNode>(BasePtr->getOperand(1))->getSExtValue();
|
||||
@ -9239,9 +9239,9 @@ static SDValue splitStoreSplat(SelectionDAG &DAG, StoreSDNode &St,
|
||||
unsigned Offset = EltOffset;
|
||||
while (--NumVecElts) {
|
||||
unsigned Alignment = MinAlign(OrigAlignment, Offset);
|
||||
SDValue OffsetPtr = DAG.getNode(
|
||||
ISD::ADD, DL, MVT::i64, BasePtr,
|
||||
DAG.getConstant(BaseOffset + ((int64_t)Offset), DL, MVT::i64));
|
||||
SDValue OffsetPtr =
|
||||
DAG.getNode(ISD::ADD, DL, MVT::i64, BasePtr,
|
||||
DAG.getConstant(BaseOffset + Offset, DL, MVT::i64));
|
||||
NewST1 = DAG.getStore(NewST1.getValue(0), DL, SplatVal, OffsetPtr,
|
||||
PtrInfo.getWithOffset(Offset), Alignment,
|
||||
St.getMemOperand()->getFlags());
|
||||
|
Loading…
x
Reference in New Issue
Block a user