[llvm] IR: Add attribute negated (PR #121027)
YunQiang Su via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 24 17:23:36 PST 2024
wzssyqa wrote:
> Using attributes for this is not appropriate. This should probably be a separate intrinsic (if anything).
Since we have 4 cases here, use aarch64 as an example:
```
fmadd: c + a *b
fnmadd: (-c) + (-a) * b
fmsub: c - a * b
fnmsub: -c - (-a) * b
```
In the backend, `fneg` can merged with `fmuladd` on platform that support FMA so we have `fmuladd` only.
If we introduce more intrinsics, we will have lots of backend work.
https://github.com/llvm/llvm-project/pull/121027
More information about the llvm-commits
mailing list