[llvm] [AArch64] Emit ST<OP> instruction when the return value has no use. (PR #72887)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 21 04:44:29 PST 2023


sun-jacobi wrote:

> > > Using LDADD here is a conscious decision by compilers (GCC also generates the same code). See the thread at https://gcc.gnu.org/pipermail/gcc-patches/2018-October/509550.html
> > 
> > 
> > Thanks for the useful information. But maybe we can add a special handling for the LD with acquire semantics?
> 
> It's tempting to do this translation to STADD only for the relaxed memory model, but apparently that's not legal either: https://gcc.gnu.org/pipermail/gcc-patches/2018-October/509632.html

It seems that only `LDADDA` and `LDADDAL` load from memory with acquire semantics. 

In other cases, like `LDADDL` and `STADDL`, 
> STADDL stores to memory with release semantics
> LDADDL and LDADDAL store to memory with release semantics.  

the semantics seems to be the same. 



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


More information about the llvm-commits mailing list