r302835 - Issue diagnostics when returning FP values on x86_64 without SSE1/2

Nico Weber via cfe-commits cfe-commits at lists.llvm.org
Thu May 11 18:46:48 PDT 2017


The inline snippet doesn't show the actual code change, but
http://llvm.org/viewvc/llvm-project?view=revision&revision=302835 does show
it. Is the email sender broken?

On Thu, May 11, 2017 at 6:43 PM, Reid Kleckner via cfe-commits <
cfe-commits at lists.llvm.org> wrote:

> Author: rnk
> Date: Thu May 11 17:43:02 2017
> New Revision: 302835
>
> URL: http://llvm.org/viewvc/llvm-project?rev=302835&view=rev
> Log:
> Issue diagnostics when returning FP values on x86_64 without SSE1/2
>
> Avoid using report_fatal_error, because it will ask the user to file a
> bug. If the user attempts to disable SSE on x86_64 and them use floating
> point, that's a bug in their code, not a bug in the compiler.
>
> This is just a start. There are other ways to crash the backend in this
> configuration, but they should be updated to follow this pattern.
>
> Differential Revision: https://reviews.llvm.org/D27522
>
> Added:
>     cfe/trunk/test/CodeGen/x86_64-mno-sse.c
>
> Added: cfe/trunk/test/CodeGen/x86_64-mno-sse.c
> URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/
> CodeGen/x86_64-mno-sse.c?rev=302835&view=auto
> ============================================================
> ==================
> --- cfe/trunk/test/CodeGen/x86_64-mno-sse.c (added)
> +++ cfe/trunk/test/CodeGen/x86_64-mno-sse.c Thu May 11 17:43:02 2017
> @@ -0,0 +1,15 @@
> +// RUN: %clang_cc1 -triple x86_64-linux -target-feature -sse
> -target-feature -sse2 -S -o /dev/null -verify %s
> +// REQUIRES: x86-registered-target
> +
> +double f1(void) { // expected-error {{SSE register return with SSE
> disabled}}
> +  return 1.4;
> +}
> +extern double g;
> +void f2(void) { // expected-error {{SSE register return with SSE
> disabled}}
> +  g = f1();
> +}
> +void take_double(double);
> +void pass_double(void) {
> +  // FIXME: Still asserts.
> +  //take_double(1.5);
> +}
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170511/5277fa28/attachment-0001.html>


More information about the cfe-commits mailing list