[llvm-commits] [PATCH, test-suite, AltiVec][4/4] Work around sin/cos accuracy differences
Hal Finkel
hfinkel at anl.gov
Fri Oct 12 06:39:08 PDT 2012
----- Original Message -----
> From: "Ulrich Weigand" <Ulrich.Weigand at de.ibm.com>
> To: llvm-commits at cs.uiuc.edu
> Sent: Friday, October 12, 2012 7:26:23 AM
> Subject: [llvm-commits] [PATCH, test-suite, AltiVec][4/4] Work around sin/cos accuracy differences
>
>
> Hello,
>
> with the previous three patches applied, I'm still seeing failures in
> the
> alti.expandfft and alti.stepfft test cases, due to slight numerical
> differences in the results. These turn out to be caused by slightly
> different values in the sin/cos tables initially computed by "cffti",
> which
> amplify up to visible differences in the final results.
>
> The actual cause of those different values even on the same system in
> this
> particular case seems to be GCC replacing a pair of sin/cos library
> calls
> with a single call to sincos, which LLVM doesn't do. The results of
> sincos
> sometimes differ in the last bit, however ...
>
> I noticed that in another test case (SingleSource/Benchmarks/Misc-C+
> +/Large/sphereflake), some code has been added to work around what
> appears
> to be the same problem, by allowing for sin/cos library values that
> differ
> in the last bit. Therefore, the attached patch copies that same
> code to
> those Altivec test cases as well, resulting in identical output for
> GCC and
> clang compiled binaries.
>
> OK to commit?
As this approach is already being used elsewhere, this is fine with me.
-Hal
>
> Bye,
> Ulrich
>
> (See attached file: diff-testsuite-altivec-sincos)
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
--
Hal Finkel
Postdoctoral Appointee
Leadership Computing Facility
Argonne National Laboratory
More information about the llvm-commits
mailing list