[PATCH] D145863: [X86][NFC] Use uint64_t for passing the alignment
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 13 01:24:20 PDT 2023
pengfei updated this revision to Diff 504543.
pengfei added a comment.
Address review comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145863/new/
https://reviews.llvm.org/D145863
Files:
llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
Index: llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
===================================================================
--- llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
+++ llvm/lib/Target/X86/X86SelectionDAGInfo.cpp
@@ -204,7 +204,7 @@
static SDValue emitConstantSizeRepmov(
SelectionDAG &DAG, const X86Subtarget &Subtarget, const SDLoc &dl,
SDValue Chain, SDValue Dst, SDValue Src, uint64_t Size, EVT SizeVT,
- unsigned Align, bool isVolatile, bool AlwaysInline,
+ Align Alignment, bool isVolatile, bool AlwaysInline,
MachinePointerInfo DstPtrInfo, MachinePointerInfo SrcPtrInfo) {
/// TODO: Revisit next line: big copy with ERMSB on march >= haswell are very
@@ -219,10 +219,10 @@
assert(!Subtarget.hasERMSB() && "No efficient RepMovs");
/// We assume runtime memcpy will do a better job for unaligned copies when
/// ERMS is not present.
- if (!AlwaysInline && (Align & 3) != 0)
+ if (!AlwaysInline && (Alignment.value() & 3) != 0)
return SDValue();
- const MVT BlockType = getOptimalRepmovsType(Subtarget, Align);
+ const MVT BlockType = getOptimalRepmovsType(Subtarget, Alignment.value());
const uint64_t BlockBytes = BlockType.getSizeInBits() / 8;
const uint64_t BlockCount = Size / BlockBytes;
const uint64_t BytesLeft = Size % BlockBytes;
@@ -251,7 +251,7 @@
Chain, dl,
DAG.getNode(ISD::ADD, dl, DstVT, Dst, DAG.getConstant(Offset, dl, DstVT)),
DAG.getNode(ISD::ADD, dl, SrcVT, Src, DAG.getConstant(Offset, dl, SrcVT)),
- DAG.getConstant(BytesLeft, dl, SizeVT), llvm::Align(Align), isVolatile,
+ DAG.getConstant(BytesLeft, dl, SizeVT), Alignment, isVolatile,
/*AlwaysInline*/ true, /*isTailCall*/ false,
DstPtrInfo.getWithOffset(Offset), SrcPtrInfo.getWithOffset(Offset)));
return DAG.getNode(ISD::TokenFactor, dl, MVT::Other, Results);
@@ -281,10 +281,10 @@
/// Handle constant sizes,
if (ConstantSDNode *ConstantSize = dyn_cast<ConstantSDNode>(Size))
- return emitConstantSizeRepmov(
- DAG, Subtarget, dl, Chain, Dst, Src, ConstantSize->getZExtValue(),
- Size.getValueType(), Alignment.value(), isVolatile, AlwaysInline,
- DstPtrInfo, SrcPtrInfo);
+ return emitConstantSizeRepmov(DAG, Subtarget, dl, Chain, Dst, Src,
+ ConstantSize->getZExtValue(),
+ Size.getValueType(), Alignment, isVolatile,
+ AlwaysInline, DstPtrInfo, SrcPtrInfo);
return SDValue();
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145863.504543.patch
Type: text/x-patch
Size: 2509 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230313/8ed0f8ce/attachment.bin>
More information about the llvm-commits
mailing list