[llvm] AtomicExpand: Preserve metadata when expanding partword RMW (PR #89769)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 1 19:46:05 PDT 2024


nikic wrote:

> > > Is it really a good idea to blindly preserve all unknown metadata?
> > > ISTM we have no way of knowing if the metadata will be valid on the modified instruction or not. Maybe better to preserve only known-to-be-OK metadata?
> > 
> > 
> > The cases I really need to preserve are target string metadata, i.e. "unknown"
> 
> So options are 1. hardcode the amdgpu prefixed metadata, or 2. promote the AMDGPU metadata to one of the builtin recognized metadata types?

Which metadata are you interested in?

Agree that blindly copying metadata is not a good idea -- as your own comment points out, this is already incorrect for !noundef.

https://github.com/llvm/llvm-project/pull/89769


More information about the llvm-commits mailing list