[PATCH] D42815: [AArch64FastISel] Replace deprecated calls to MemoryIntrinsic::getAlignment() (NFCI)

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 21:41:55 PST 2018


dneilson added inline comments.


================
Comment at: lib/Target/AArch64/AArch64FastISel.cpp:3274
+// FIXME: MemCpy intrinsic now provides separate alignments for source and
+// dest. Enhance this function to exploit this.
 bool AArch64FastISel::tryEmitSmallMemCpy(Address Dest, Address Src,
----------------
I really don't know anything about AArch64; hence why I created a review for such a seemingly trivial change. Is this FIXME accurate on AArch64? i.e. Is there any value in knowing both the source & destination alignments when generating inlined tiny memcpy code sequences?


================
Comment at: lib/Target/AArch64/AArch64FastISel.cpp:3462
       uint64_t Len = cast<ConstantInt>(MTI->getLength())->getZExtValue();
-      unsigned Alignment = MTI->getAlignment();
+      unsigned Alignment = MinAlign(MTI->getDestAlignment(),
+                                    MTI->getSourceAlignment());
----------------
Again, I really don't know anything about AArch64. This preserves the current behaviour -- this code is equivalent to what already exists. Would it be better to, say, only use the destination alignment here?


Repository:
  rL LLVM

https://reviews.llvm.org/D42815





More information about the llvm-commits mailing list