Re: [PATCH v2] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-16 Thread Xi Ruoyao
On Thu, 2023-11-16 at 09:18 +0800, chenglulu wrote: > > 在 2023/11/15 下午7:38, Xi Ruoyao 写道: > > Pushed r14-5486. > > > > /* snip */ > > > > > > * gcc.target/loongarch/cas-acquire.c: New test. > > This test fails with GCC 12/13 on LA664, and it indicates a > > correctness > > issue.  May

Re: [PATCH v2] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-15 Thread chenglulu
在 2023/11/15 下午7:38, Xi Ruoyao 写道: Pushed r14-5486. /* snip */ * gcc.target/loongarch/cas-acquire.c: New test. This test fails with GCC 12/13 on LA664, and it indicates a correctness issue. May I backport this patch to 12/13 as well? I think we can backport. Thanks!

Re: [PATCH v2] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-15 Thread Xi Ruoyao
Pushed r14-5486. /* snip */ > > * gcc.target/loongarch/cas-acquire.c: New test. This test fails with GCC 12/13 on LA664, and it indicates a correctness issue. May I backport this patch to 12/13 as well? -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University

Re: [PATCH v2] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-15 Thread chenglulu
在 2023/11/15 上午5:52, Xi Ruoyao 写道: This is isomorphic to the LLVM changes [1-2]. On LoongArch, the LL and SC instructions has memory barrier semantics: - LL: + - SC: + But the compare and swap operation is allowed to fail, and if it fails the SC instruction is not executed, thus the

[PATCH v2] LoongArch: Remove redundant barrier instructions before LL-SC loops

2023-11-14 Thread Xi Ruoyao
This is isomorphic to the LLVM changes [1-2]. On LoongArch, the LL and SC instructions has memory barrier semantics: - LL: + - SC: + But the compare and swap operation is allowed to fail, and if it fails the SC instruction is not executed, thus the guarantee of acquiring semantics cannot be