[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)
Benjamin Maxwell via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 11 13:08:27 PST 2025
MacDue wrote:
> > when -fno-math-errno is set
>
> What does -fno-math-errno have to do with anything? modf never sets errno anyway.
With the current `modf` builtin (not changed here) it skips the code path for emitting intrinsics when `math-errno` is enabled. I think setting `ConstIgnoringExceptions` on the builtin would allow the intrinsics even with `math-errno` (though that's not necessary for our use case).
https://github.com/llvm/llvm-project/blob/0121d99af4d121242becc05941c939cad84105d4/clang/lib/CodeGen/CGBuiltin.cpp#L3024-L3035
https://github.com/llvm/llvm-project/pull/126750
More information about the cfe-commits
mailing list