[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2024-04-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

Andrew Pinski  changed:

   What|Removed |Added

  Known to work||6.2.0, 7.1.0
  Known to fail||6.1.0
   Target Milestone|--- |6.2

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2024-04-14 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

Andrew Pinski  changed:

   What|Removed |Added

 CC||matthew.thompson at nasa dot 
gov

--- Comment #22 from Andrew Pinski  ---
*** Bug 77344 has been marked as a duplicate of this bug. ***

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-07-07 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

Jakub Jelinek  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #21 from Jakub Jelinek  ---
Thus this PR is fixed and the other one needs to deal with all the spots where
the comparisons instructions are chosen in the backend.

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-07-02 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

--- Comment #20 from Jakub Jelinek  ---
Author: jakub
Date: Sat Jul  2 10:18:27 2016
New Revision: 237938

URL: https://gcc.gnu.org/viewcvs?rev=237938=gcc=rev
Log:
Backported from mainline
2016-06-20  Jakub Jelinek  

PR target/71559
* config/i386/i386.c (ix86_fp_cmp_code_to_pcmp_immediate): Fix up
returned values and add UN*/LTGT/*ORDERED cases with values matching
D operand modifier on vcmp for AVX.

* gcc.target/i386/sse2-pr71559.c: New test.
* gcc.target/i386/avx-pr71559.c: New test.
* gcc.target/i386/avx512f-pr71559.c: New test.

Added:
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/avx-pr71559.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/avx512f-pr71559.c
branches/gcc-6-branch/gcc/testsuite/gcc.target/i386/sse2-pr71559.c
Modified:
branches/gcc-6-branch/gcc/ChangeLog
branches/gcc-6-branch/gcc/config/i386/i386.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

--- Comment #19 from Jakub Jelinek  ---
Author: jakub
Date: Mon Jun 20 19:17:12 2016
New Revision: 237614

URL: https://gcc.gnu.org/viewcvs?rev=237614=gcc=rev
Log:
PR target/71559
* config/i386/i386.c (ix86_fp_cmp_code_to_pcmp_immediate): Fix up
returned values and add UN*/LTGT/*ORDERED cases with values matching
D operand modifier on vcmp for AVX.

* gcc.target/i386/sse2-pr71559.c: New test.
* gcc.target/i386/avx-pr71559.c: New test.
* gcc.target/i386/avx512f-pr71559.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/avx-pr71559.c
trunk/gcc/testsuite/gcc.target/i386/avx512f-pr71559.c
trunk/gcc/testsuite/gcc.target/i386/sse2-pr71559.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

Jakub Jelinek  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |jakub at gcc dot gnu.org

--- Comment #18 from Jakub Jelinek  ---
Created attachment 38729
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38729=edit
gcc7-pr71559.patch

Untested patch I'm going to bootstrap/regtest then.
The test coverage should cover all the comparisons except of LTGT, and test
there everything but FE_INEXACT, for SSE2, AVX and AVX512F.

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-20 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

--- Comment #17 from Uroš Bizjak  ---
(In reply to Jakub Jelinek from comment #15)
> Anyway, to make progress for KNL, would you be ok with a patch containing
> just the ix86_fp_cmp_code_to_pcmp_immediate hunk tweaked so that it emits
> the same thing as %D, and as a follow-up we can try to handle
> -ftrapping-math and all that stuff in all places.  Ok?
Yes, let's consider this PR to fix the ICE, and handle -ftrapping-math issue in
other mentioned PRs in a separate way.

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-20 Thread ubizjak at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

Uroš Bizjak  changed:

   What|Removed |Added

 CC||hubicka at gcc dot gnu.org

--- Comment #16 from Uroš Bizjak  ---
(In reply to Jakub Jelinek from comment #14)
> So, shall the backend emit different code for -ftrapping-math vs.
> -fno-trapping-math, perhaps by using the non-trapping insns for the latter
> for all comparisons (both scalar and vector)?

Maybe Honza (CC'd) has some ideas.

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

--- Comment #15 from Jakub Jelinek  ---
Anyway, to make progress for KNL, would you be ok with a patch containing just
the ix86_fp_cmp_code_to_pcmp_immediate hunk tweaked so that it emits the same
thing as %D, and as a follow-up we can try to handle -ftrapping-math and all
that stuff in all places.  Ok?

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-20 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

--- Comment #14 from Jakub Jelinek  ---
(In reply to Uroš Bizjak from comment #12)
> The "Once gcc is able ..." part in the comment implies that simply returning
> different mode based on the incoming rtx code argument won't work. OTOH,
> this is ancient comment, so things *could* work now.

E.g. fold-const.c (invert_tree_comparison) now has:
  if (honor_nans && flag_trapping_math && code != EQ_EXPR && code != NE_EXPR
  && code != ORDERED_EXPR && code != UNORDERED_EXPR)
return ERROR_MARK;
so at least for -ftrapping-math and no -ffast-math suboptions it should do the
right thing, but we had this for years (e.g. 4.4 gave up always, instead of
properly being able to invert EQ/NE/ORDERED/UNORDERED.
So, shall the backend emit different code for -ftrapping-math vs.
-fno-trapping-math, perhaps by using the non-trapping insns for the latter for
all comparisons (both scalar and vector)?

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-19 Thread tripiana at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

--- Comment #13 from Carlos Tripiana Montes  ---
The code you are referring to (ix86_fp_compare_mode) is an old, well-stablish,
one:

https://gcc.gnu.org/viewcvs/gcc/trunk/gcc/config/i386/i386.c?r1=38978=38979=38979;

(line 4653 enum machine_mode)

The actual code comes from a 2001's commit. Just to point out that, most
probably, there's a lot of code depending on it.

[Bug target/71559] ICE in ix86_fp_cmp_code_to_pcmp_immediate, at config/i386/i386.c:23042 (KNL/AVX512)

2016-06-18 Thread pinskia at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71559

Andrew Pinski  changed:

   What|Removed |Added

   Keywords||ice-on-valid-code
  Component|libgcc  |target
   Severity|major   |normal