[llvm] r303980 - Fix signedness of constant. NFC.
Nirav Dave via llvm-commits
llvm-commits at lists.llvm.org
Fri May 26 05:53:11 PDT 2017
Author: niravd
Date: Fri May 26 07:53:10 2017
New Revision: 303980
URL: http://llvm.org/viewvc/llvm-project?rev=303980&view=rev
Log:
Fix signedness of constant. NFC.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
Modified: llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp?rev=303980&r1=303979&r2=303980&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64ISelLowering.cpp Fri May 26 07:53:10 2017
@@ -9222,14 +9222,14 @@ static SDValue splitStoreSplat(Selection
// 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(Selection
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());
More information about the llvm-commits
mailing list