<div dir="ltr"><div style>As reported in this bug:</div><div><br></div><a href="http://llvm.org/bugs/show_bug.cgi?id=15620">http://llvm.org/bugs/show_bug.cgi?id=15620</a><br><div><br></div><div style>fpcmp gets it wrong when comparing floating point numbers.</div>
<div style><br></div><div style>I found that it happens when comparing numbers with different number of digits, ex:</div><div style><br></div><div style><div>257359.326881721</div><div>257359.32688172</div><div><br></div>
<div style>when fpcmp would compare the number with highest precision with the next one of the low precision.</div><div style><br></div><div style>The attached patch works around this by rolling back one byte if the difference is in a space AND the previous one is a number. Since only one of the numbers can be at the space (the shorter one), I only roll back one the shorter one.</div>
<div style><br></div><div style>This patch fixes sqlite3 on ARM and will probably fix on TILE-Gx, too.</div><div style><br></div><div style>Please review.</div><div style><br></div><div style>Thanks,</div><div style>--renato</div>
</div></div>