[PATCH] D157836: [RFC][IR] Correct lowering of `f128` intrinsics
Trevor Gross via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 14 15:17:18 PDT 2023
tmgross added a comment.
In D157836#4586599 <https://reviews.llvm.org/D157836#4586599>, @efriedma wrote:
> If there's literally no implementation of sinf128 available, I don't think we can do much better than just letting the linker produce a "sinf128 not found" error. I mean, a compiler error might be slightly better, but not by a lot, so I don't think it's worth the complexity to try to produce one. (And this way lets the user provide their own implementation if they want to.)
That sounds good, still a lot better than runtime computation errors
> My primary concern here is the effect on non-x86 targets. For targets where "long double" is f128, lowering "llvm.sin.f128" to "sinl" is fine, and messing with the name could break previously working code. So maybe instead of messing with RuntimeLibcalls.def directly, we should make the backend fix the names (call setLibcallName() in X86ISelLowering.cpp).
Thank you for the direction - is there a place to do this in a more platform-generic way based on the layout of `long double`? I think there quite a few targets where `long double != f128` especially non-64-bit.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157836/new/
https://reviews.llvm.org/D157836
More information about the llvm-commits
mailing list