[PATCH] D123693: Transform illegal intrinsics to V_ILLEGAL

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 07:12:46 PDT 2022


foad added a comment.

In D123693#3696457 <https://reviews.llvm.org/D123693#3696457>, @arsenm wrote:

> In D123693#3690864 <https://reviews.llvm.org/D123693#3690864>, @foad wrote:
>
>> Right, but why can't `global_atomic_fadd` and `generic_atomic_fadd` be functions that just contain a call to the corresponding builtin and have an appropriate "target-cpu"= attribute? I guess you would need to do inlining in the backend once you know what subtarget you are compiling for. Is that viable?
>
> The problem is in the called function with the appropriate attributes. The function isn't deleted and we still need to produce something. The current situation is it works in cases where the wrong subtarget also happens to have the same encoding, but breaks on targets that never had an equivalent instruction encoded

If target-cpu doesn't let you target different CPUs for different functions then I don't understand what it does.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D123693/new/

https://reviews.llvm.org/D123693



More information about the llvm-commits mailing list