[PATCH] D157737: [Lint] Permit aliasing noalias and readnone arguments

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 11 10:57:04 PDT 2023


bjope added a comment.

For reference, here is an example that made me look at this: https://godbolt.org/z/xY4hE9Kvb
The caller is doing

  call void @foo(ptr nonnull sret(%struct.A) align 8 %3, ptr noundef nonnull align 8 %1)

and the callee is

  define dso_local void @foo(ptr noalias nocapture writeonly sret(%struct.A) align 8 %0, ptr nocapture noundef readnone align 8 %1) local_unnamed_addr #0

And then memcpyopt will rewrite the call to use same ptr for both arguments, which then result in complaints from lint. But I think that should be OK here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D157737



More information about the llvm-commits mailing list