[llvm-commits] [PATCH, test-suite, AltiVec][4/4] Work around sin/cos accuracy differences

Ulrich Weigand Ulrich.Weigand at de.ibm.com
Fri Oct 12 05:26:23 PDT 2012


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?

Bye,
Ulrich

(See attached file: diff-testsuite-altivec-sincos)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff-testsuite-altivec-sincos
Type: application/octet-stream
Size: 2452 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121012/8f33d3ea/attachment.obj>


More information about the llvm-commits mailing list