[llvm] SimplifyLibCalls: Don't require ldexp to emit intrinsic in exp2 combine (PR #92707)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Mon May 20 11:25:06 PDT 2024
efriedma-quic wrote:
> > IMO it was wrong to provide any math intrinsics to expose the usage of math functions. These intrinsics should be providing the target implementation of the libm functions, not the other way around. If we can't codegen the intrinsic without the libcall, we probably shouldn't have the intrinsic.
>
> I see where you're coming from with this... see also discussion on https://discourse.llvm.org/t/rfc-all-the-math-intrinsics/78294 . If you're willing to push forward something to break apart the current mess, I'd be in favor.
Maybe the right thing to do here is just use TTI: we ask the target if it can handle the intrinsic, it says yes if either the libcall is legal, or it has some other implementation it can use.
https://github.com/llvm/llvm-project/pull/92707
More information about the llvm-commits
mailing list