[llvm] [AMDGPU] Add lit() asm operand modifier for SP3 compatibility. (PR #68839)
Stanislav Mekhanoshin via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 12 03:50:40 PDT 2023
rampitec wrote:
> > > abs(neg(x)) could be treated as abs(x).
> >
> >
> > So far I was under impression that these modifiers are supposed to designate corresponding encoding bits, just as our `id[:value]` instruction modifiers do, in which case the expectation would probably be to not allow combinations that are not supported by the target hardware.
> > Otherwise, if we see these more like generic expressions, then maybe using the good old minus sign would make more sense than `neg()`?
>
> Fair point. I am happy for abs(neg(x)) to be an assembler error.
Technically -123.0 and neg(123.0) are different things. First is a negative constant. Second is a positive constant and a modifier. But noone does it, not even SP3.
https://github.com/llvm/llvm-project/pull/68839
More information about the llvm-commits
mailing list