<div dir="ltr">Indeed, it's nice to have __float128 in both clang and llvm.<div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Dec 11, 2015 at 6:30 PM, Xinliang David Li <span dir="ltr"><<a href="mailto:davidxl@google.com" target="_blank">davidxl@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">that is great!<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, Dec 11, 2015 at 6:09 PM, Hal Finkel <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>> wrote:<br>
> ----- Original Message -----<br>
>> From: "Xinliang David Li via llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
>> To: "Chih-hung Hsieh" <<a href="mailto:chh@google.com">chh@google.com</a>><br>
>> Cc: "llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>>, <a href="mailto:reviews%2BD11438%2Bpublic%2B6e2ebe02f28cebc7@reviews.llvm.org">reviews+D11438+public+6e2ebe02f28cebc7@reviews.llvm.org</a>, "Elliott<br>
>> Hughes" <<a href="mailto:enh@google.com">enh@google.com</a>><br>
>> Sent: Friday, December 11, 2015 8:06:11 PM<br>
>> Subject: Re: [PATCH] D11438: Part 2 to fix x86_64 fp128 calling convention.<br>
>><br>
>> On Fri, Dec 11, 2015 at 4:41 PM, Chih-hung Hsieh <<a href="mailto:chh@google.com">chh@google.com</a>><br>
>> wrote:<br>
>> >><br>
>> >> > ================<br>
>> >> > Comment at: test/CodeGen/X86/fp128-i128.ll:44<br>
>> >> > @@ +43,3 @@<br>
>> >> > +; CHECK:       movaps %xmm0, -24(%rsp)<br>
>> >> > +; CHECK-NEXT:  movq -24(%rsp), %rax<br>
>> >> > +; CHECK-NEXT:  movabsq $281474976710655, %rcx<br>
>> >> > ----------------<br>
>> >> > davidxl wrote:<br>
>> >> >> The pattern checked is pretty long -- I worry it may break in<br>
>> >> >> the<br>
>> >> >> future. Is it possible to relax it some how?<br>
>> >> > I tried to reduce the C code, but any reduction won't trigger<br>
>> >> > the<br>
>> >> > complicated IL that reached a point that my partial fix core<br>
>> >> > dumped. Maybe<br>
>> >> > we can take out a few CHECK-NEXT requirements.<br>
>> >><br>
>> >> Where does it core-dump? If it is in new code, it needs to be<br>
>> >> fixed :)<br>
>> >> Otherwise file a bug.<br>
>> >><br>
>> ><br>
>> > Ah, I meant my incomplete fix at some time in the past.<br>
>> > My current patch passes these tests.<br>
>> > Adding these tests might catch future regression if anyone changes<br>
>> > f128<br>
>> > optimization.<br>
>> ><br>
>> ><br>
>> >><br>
>> >> ><br>
>> >> > On the other hard, I was terrified by so many ad-hoc<br>
>> >> > optimizations of<br>
>> >> > floating points for the usage patterns in libm.<br>
>> >> > I guess llvm tried to match or do better then gcc and libm tried<br>
>> >> > to use<br>
>> >> > every possible bit operations.<br>
>> >> > So maybe it is better for Android or anyone depends on f128 type<br>
>> >> > to have<br>
>> >> > more check rules here.<br>
>> >> > Whoever changes float optimization in the future has better<br>
>> >> > fully<br>
>> >> > understand and update these tests.<br>
>> >><br>
>> >> Maybe these complicated/fragile case do not belong here -- but<br>
>> >> somewhere downstream (libm).<br>
>> ><br>
>> ><br>
>> > Yes, AOSP bionic has already libm unit tests.<br>
>> > Most of my unit tests here are reduced from failed cases I hit with<br>
>> > my<br>
>> > incomplete work.<br>
>> > Now this patch passes all AOSP libm tests.<br>
>> ><br>
>> > It's difficult to expect all people changing LLVM floating points<br>
>> > run<br>
>> > through all libm tests for the Android target. So I do my best to<br>
>> > add more<br>
>> > unit tests here.<br>
>> ><br>
>><br>
>> I suggest implementing __float128 in Clang as  follow up<br>
><br>
> Nemanjai is already working on this (<a href="http://reviews.llvm.org/D15120" rel="noreferrer" target="_blank">http://reviews.llvm.org/D15120</a>).<br>
><br>
>  -Hal<br>
><br>
>> so that<br>
>> others can benefit from this feature other than Android.<br>
>><br>
>> David<br>
>><br>
>> > -- chh<br>
>> ><br>
>> ><br>
>> >><br>
>> >><br>
>> >> David<br>
>> >><br>
>> >><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> >> > <a href="http://reviews.llvm.org/D11438" rel="noreferrer" target="_blank">http://reviews.llvm.org/D11438</a><br>
>> >> ><br>
>> >> ><br>
>> >> ><br>
>> ><br>
>> ><br>
>> _______________________________________________<br>
>> llvm-commits mailing list<br>
>> <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
>><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
</div></div></blockquote></div><br></div>