[llvm] [LoongArch] Prevent R0/R1 allocation for rj operand of {G}CSRXCHG (PR #140862)

WÁNG Xuěruì via llvm-commits llvm-commits at lists.llvm.org
Wed May 21 19:11:32 PDT 2025


xen0n wrote:

> > Also for proper shell-like expansion you would want `{,G}CSRXCHG` (notice the comma).
> > 
> > ```
> > $ echo {,G}CSRXCHG
> > CSRXCHG GCSRXCHG
> > $ echo {G}CSRXCHG
> > {G}CSRXCHG
> > ```
> 
> Thanks! `{,G}CSRXCHG` is indeed valid for shell-style expansion, but here the intent is mainly documentation/readability and grep friendliness in comments. `{G}CSRXCHG` is more readable and still clearly expresses both forms, without implying literal brace expansion.

Hmm then maybe "(G)CSRXCHG" with parens instead of braces?

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


More information about the llvm-commits mailing list