[llvm] Enable logf128 constant folding for hosts with 128bit long double (PR #104929)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 02:11:26 PDT 2024
davemgreen wrote:
Hello. The behaviour of llvm fp already depends on the host architecture, you have just found another place where that is again true. The compiler has for a long time used the host architectures c library implementation to perform constant folding of fp values. I can appreciate why the determinism you talk about is useful but this is causing some very large performance problems with the difference between fp128 soft-float routines and constant folding. In the long run we would like it to work as you say with an implementation in APFloat, but as far as I understand from looking around that does not exist yet given the current constraints inside llvm (no exp for newton iterations, no sqrt for whatever agm is).
The two machines you mention (aarch64 on x86 and aarch64 on aarch64) I would expect should both have logf128 providing they are new enough (or fp128 would not be relevant for them).
I believe all the buildbots and reported issues were fixed with the changes from 001e423ac6261 and 83a5c7cb62e404a7. It is a shame this got so close before being reverted.
https://github.com/llvm/llvm-project/pull/104929
More information about the llvm-commits
mailing list