[PATCH] XCore fix for SingleSource/Benchmarks/Misc-C++/Large/sphereflake
robert lytton
robert at xmos.com
Tue Mar 11 09:04:10 PDT 2014
Hi Daniel,
Yes, the raw sin() functions seem to only differ by 'one', but this +-1 may cause a carry into higher bits!
By chance, rounding up seems to work in most situations.
I may be able to 'by chance' change the rounding mechanism to make all targets agree - but this seems the wrong way to do it.
An alternative approach would be to hard-code the initialisation data : 66429 * 3 * 8 = 1.6MB.
Or, just hard-code the values that are causing problems - only one at present.
Any future problems can add to the table as necessary - with no need of #ifdefs.
Patch to follow.
Robert
http://llvm-reviews.chandlerc.com/D3022
More information about the llvm-commits
mailing list