[PATCH] D151626: [MemCpyOpt] clarify the comment in byval alignment test(NFC)

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 28 00:52:24 PDT 2023


khei4 created this revision.
khei4 added a reviewer: nikic.
Herald added a subscriber: StephenFan.
Herald added a project: All.
khei4 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

While reading MemCpyOpt's processByValArgument, removing alignment checks cause failure in a test named smaller.ll <https://github.com/llvm/llvm-project/blob/main/llvm/test/Transforms/MemCpyOpt/smaller.ll> 
I think smaller size memcpy than the original type is valid and should be reduced in MemCpyOpt but in this case, I think the problem is unknown alignment for the arg.


https://reviews.llvm.org/D151626

Files:
  llvm/test/Transforms/MemCpyOpt/byval-unknown-alignment.ll
  llvm/test/Transforms/MemCpyOpt/smaller.ll


Index: llvm/test/Transforms/MemCpyOpt/byval-unknown-alignment.ll
===================================================================
--- llvm/test/Transforms/MemCpyOpt/byval-unknown-alignment.ll
+++ llvm/test/Transforms/MemCpyOpt/byval-unknown-alignment.ll
@@ -3,7 +3,7 @@
 ; rdar://8875553
 
 ; Memcpyopt shouldn't optimize the second memcpy using the first
-; because the first has a smaller size.
+; because the first(@cell) has an unknown alignment.
 
 target datalayout = "e-p:32:32:32"
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D151626.526312.patch
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230528/2dbfdd1a/attachment.bin>


More information about the llvm-commits mailing list