[PATCH] D123693: Transform illegal intrinsics to V_ILLEGAL

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 3 06:46:14 PDT 2022


arsenm added a comment.

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


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