[PATCH] D118681: [AArch64] Do not use ABI alignment for mops.memset.tag
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 00:45:17 PST 2022
nikic created this revision.
nikic added reviewers: dmgreen, tyb0807.
Herald added subscribers: hiraditya, kristof.beyls.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Pointer element types do not imply that the pointer is ABI aligned. We should be using either an explicit `align` attribute here, or fall by to an alignment of 1.
This fixes a new element type access introduced in D117764 <https://reviews.llvm.org/D117764>.
https://reviews.llvm.org/D118681
Files:
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
Index: llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
===================================================================
--- llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -11928,12 +11928,11 @@
case Intrinsic::aarch64_mops_memset_tag: {
Value *Dst = I.getArgOperand(0);
Value *Val = I.getArgOperand(1);
- PointerType *PtrTy = cast<PointerType>(Dst->getType());
Info.opc = ISD::INTRINSIC_W_CHAIN;
Info.memVT = MVT::getVT(Val->getType());
Info.ptrVal = Dst;
Info.offset = 0;
- Info.align = DL.getABITypeAlign(PtrTy->getPointerElementType());
+ Info.align = I.getParamAlign(0).valueOrOne();
Info.flags = MachineMemOperand::MOStore;
// The size of the memory being operated on is unknown at this point
Info.size = MemoryLocation::UnknownSize;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D118681.404835.patch
Type: text/x-patch
Size: 855 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220201/ea11a34a/attachment.bin>
More information about the llvm-commits
mailing list