[llvm] [ConstantFold] Fold `log1p` and `log1pf` when the input parameter is a constant value. (PR #112113)

via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 24 06:49:51 PDT 2024


c8ef wrote:

> > Marking it as `XFAIL: target={{.*}}-aix{{.*}}` will be sufficient?
> 
> The XFAIL is actually wrong. The real issue is that compiling for a non-AIX target on an AIX machine will not generate the negative zero result.
> 
> A possible solution is to add the special cases to the constant-folding code in LLVM.

It appears that when using the default libc for constant folding, the result's dependency on the platform is unavoidable. In contrast, GCC uses mpfr for constant folding, which may help in disregarding platform information during computation and performing the transformation later.

BTW, could you please review #113020 if you are available? @hubert-reinterpretcast 

https://github.com/llvm/llvm-project/pull/112113


More information about the llvm-commits mailing list