[PATCH] D150970: [MemCpyOpt] Use memcpy source directly if dest is known to be immutable from attributes

Kohei Asano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 09:34:53 PDT 2023


khei4 marked an inline comment as done.
khei4 added inline comments.


================
Comment at: llvm/test/Transforms/MemCpyOpt/memcpy.ll:566
 ; CHECK-LABEL: @immut_param_enforced_alignment(
 ; CHECK-NEXT:    [[VAL:%.*]] = alloca i8, align 1
 ; CHECK-NEXT:    store i32 42, ptr [[VAL]], align 4
----------------
nikic wrote:
> nikic wrote:
> > Hm, so I expected that for this test case the transform would happen and change to `align 4` here. Do you know why it doesn't?
> Hm, this does work when I test the patch locally, so maybe just outdated test result?
> Hm, this does work when I test the patch locally, so maybe just outdated test result?

Yeah, Sorry... I have forgotten to build before the test update. I believe this works fine.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150970/new/

https://reviews.llvm.org/D150970



More information about the llvm-commits mailing list