[PATCH] D42871: [InstCombine] Simplify MemTransferInst's source and dest alignments separately

Daniel Neilson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 12 12:23:26 PST 2018


dneilson added inline comments.


================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:245
+  SrcAlign = std::max(SrcAlign, CopySrcAlign);
+  DstAlign = std::max(DstAlign, CopyDstAlign);
 
----------------
efriedma wrote:
> Aren't SrcAlign and CopySrcAlign always the same?
I'm guessing that the original code was there because it's possible for there to be a greater alignment value on the memory intrinsic than getKnownAlignment() would give us. I'm not really sure how that would happen.... I suppose that it's possible that now that the alignment on the memory intrinsic isn't just the min of the two arg alignments that these lines are now redundant.


Repository:
  rL LLVM

https://reviews.llvm.org/D42871





More information about the llvm-commits mailing list