<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 11 December 2013 17:58, Yi Jiang <span dir="ltr"><<a href="mailto:yjiang@apple.com" target="_blank">yjiang@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


It was reverted due to a LTO bug. I resubmitted it in r197109.<br></blockquote><div><br></div><div>Hi Yi! I'm replying here because there was no email sent for the commit of r197109.</div><div><br></div><div>This broke a number of tests, such as python's ujson library when built at -O2:</div>


<br>    def test_numericIntFrcExp(self):<br>        input = "1.337E40"<br>        output = ujson.decode(input)<br>        self.assertEquals(output, json.loads(input))</div><div class="gmail_quote"><br></div><div class="gmail_quote">


Their string-to-float parsing logic does a pow(10.0, expr) internally, and that's now producing a slightly different result (0x1.3a53c2af670d5p+133 vs. 0x1.3a53c2af6707ep+133 to be exact, or 1.337000000000021e+40 vs. 1.337e+40 in decimal).</div>


























<div class="gmail_quote"><br></div><div class="gmail_quote">On the one hand I'd like you to revert this patch (or disable it on linux) because it's breaking some tests, but I think it's more important first to understand what the FP accuracy guarantees are and whether we're allowed to make this transformation even though it will change the exact bit pattern produced and -ffast-math is not enabled.</div>


<div class="gmail_quote"><br></div><div class="gmail_quote">Let me know if you need help producing a testcase for where it doesn't produce bit-exact output.</div><div class="gmail_quote"><br></div><div class="gmail_quote">


Nick</div><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div>On Dec 5, 2013, at 2:45 PM, Yi Jiang <<a href="mailto:yjiang@apple.com" target="_blank">yjiang@apple.com</a>> wrote:<br>
<br>
> Checked in r196544. Thank you!<br>
> On Dec 5, 2013, at 2:35 PM, Meador Inge <<a href="mailto:meadori@codesourcery.com" target="_blank">meadori@codesourcery.com</a>> wrote:<br>
><br>
>> On 12/05/2013 03:37 PM, Yi Jiang wrote:<br>
>><br>
>>> Hi,<br>
>>><br>
>>> Thank both of you for the comments. I made some adjustment on the patch.<br>
>><br>
>> LGTM.  Please commit.  Thanks!<br>
>><br>
>> --<br>
>> Meador Inge<br>
>> CodeSourcery / Mentor Embedded<br>
><br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></blockquote></div><br></div></div>