[clang] [Clang] Do not emit intrinsic math functions on GPU targets (PR #98209)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 04:32:32 PDT 2024


jhuber6 wrote:

> This is going to break the library build. We use the __builtin functions to access the intrinsic in the cases where the llvm intrinsic lowering provides the implementation of the function. In a more sensible world, the library would not provide the implementations of functions that are implemented by the intrinsics in the first place

Well, the `libm` just provides the symbols as the builtins. But if we wanted to do that we'd need a list somewhere. That was the more complicated option, but I wasn't sure how to handle it. Since we could potentially have a pass that does the intrinsic lowering in LLVM-IR for the ones we know aren't handled.

https://github.com/llvm/llvm-project/pull/98209


More information about the cfe-commits mailing list