[PATCH] D24011: [ConstantFold] Add a flag for ppc_fp128 constant folding, since APFloat doesn't support double-double semantic

Tim Shen via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 30 13:54:20 PDT 2016

timshen added a comment.

In https://reviews.llvm.org/D24011#528490, @hfinkel wrote:

> Yes. I'm certainly sympathetic to wanting correctness tests to pass. However, this has been a known issue in LLVM for nearly a decade, and we could have made this change at any time. We did not because we judged the benefit to be not worth the performance cost to applications that benefit from the constant folding. I'm not against doing this - I suspect few applications are depending on long-double calculations on PPC for high performance computation, but I think we need to understand the rationale in light of the history here.

Currently my employer (Google) is transitioning from GCC to LLVM, and cares about PowerPC, and we care about correctness over performance gain due to ppc long double constant folding. This makes a difference from the past decade, from our perspective.

If there seems few applications are depending on this "optimization", I wonder if we can turn off the constant folding for now, and fix APFloat later if someone really cares about it?


More information about the llvm-commits mailing list