[PATCH] LNT ARM sqlite3

Renato Golin rengolin at systemcall.org
Thu Mar 28 11:33:28 PDT 2013


On 28 March 2013 18:10, Daniel Dunbar <daniel at zuster.org> wrote:
> I'm fine with this form of cowardice, as long as the changes can be
> reasonably expected to not hide a potential correctness bug (and sqlite is
> not a benchmark I anticipate to be the one to expose FP math errors). I made
> a large number of these changes to try and stabilize the output of
> benchmarks as part of moving to using reference outputs.

The problem with sqlite3 is that the FP math in is is bogus. The code
abuses of FP precision as if they were real numbers, and that's asking
for trouble.

For instance, if I round to 5 digits the number 1.55555555, sometimes
it produces 1.55554999999 which doesn't even make sense. So the
problem in sqlite3 is not just the FP math, but also how the result is
converted to strings, which affect the output fidelity.



> Please still file the bug with the fpcmp utility, with the two inputs that
> show the problem.

Will do. I'll try to isolate the issue to fpcmp only.


> One thing I do find a little odd is that all of the tests in the test suite
> pass on ARM on iOS, so I'm a little curious what platform/architecture
> difference causes you to see this. Any ideas?

SoftFP?

There are other tests (Burg, anagram, lemon) which fail on ARM (hf)
and on my laptop (x86_64) but coincidentally with the exact same
output. Anagram seems to be due to qsort being different, so the libc
version might be the culprit.

cheers,
--renato



More information about the llvm-commits mailing list