[llvm] [LoongArch] Prevent R0/R1 allocation for rj operand of {G}CSRXCHG (PR #140862)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 21 19:22:29 PDT 2025
heiher 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?
Perhaps it's better to use `[G]CSRXCHG` instead, as this aligns with the style used in the LoongArch ISA Manual.
https://github.com/llvm/llvm-project/pull/140862
More information about the llvm-commits
mailing list