public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
@ 2021-06-19  7:54 xry111 at mengyan1223 dot wang
  2021-06-19  8:11 ` [Bug middle-end/101132] " xry111 at mengyan1223 dot wang
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-19  7:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

            Bug ID: 101132
           Summary: [11/12 regression] [MIPS/MSA] internal compiler error:
                    in do_store_flag, at expr.c:12541
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: xry111 at mengyan1223 dot wang
  Target Milestone: ---

Reproducer:

int r_0, q_0;
void bar() {
  int i;
  for (i = 0; i < 96; i++) {
    r_0 = i << i ? 2 + i : -i;
    q_0 = r_0 > 2 ?: i;
  }
}

Error message:

testcase.i: In function ‘bar’:
testcase.i:2:6: internal compiler error: in do_store_flag, at expr.c:12541
    2 | void bar() {
      |      ^~~
0xdacde9 do_store_flag
        ../../gcc/gcc/expr.c:12541
0xd9fecd expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        ../../gcc/gcc/expr.c:9859
0xda2748 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        ../../gcc/gcc/expr.c:10409
0xd9aa61 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        ../../gcc/gcc/expr.c:8642
0xf0da1a expand_normal
        ../../gcc/gcc/expr.h:307
0xf18702 expand_vec_cond_optab_fn
        ../../gcc/gcc/internal-fn.c:2802
0xf1d85e expand_VCOND
        ../../gcc/gcc/internal-fn.def:143
0xf1f330 expand_internal_call(internal_fn, gcall*)
        ../../gcc/gcc/internal-fn.c:4093
0xf1f35b expand_internal_call(gcall*)
        ../../gcc/gcc/internal-fn.c:4101
0xbf2f30 expand_call_stmt
        ../../gcc/gcc/cfgexpand.c:2752
0xbf6fcf expand_gimple_stmt_1
        ../../gcc/gcc/cfgexpand.c:3850
0xbf7659 expand_gimple_stmt
        ../../gcc/gcc/cfgexpand.c:4014
0xbff943 expand_gimple_basic_block
        ../../gcc/gcc/cfgexpand.c:6056
0xc01bea execute
        ../../gcc/gcc/cfgexpand.c:6782
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

It looks very similar to PR95830, but I'm not sure if they are really related.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug middle-end/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
@ 2021-06-19  8:11 ` xry111 at mengyan1223 dot wang
  2021-06-20 12:41 ` [Bug target/101132] " xry111 at mengyan1223 dot wang
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-19  8:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

--- Comment #1 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
Forgot to mention: the flags triggering the ICE is -O3 -mmsa.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
  2021-06-19  8:11 ` [Bug middle-end/101132] " xry111 at mengyan1223 dot wang
@ 2021-06-20 12:41 ` xry111 at mengyan1223 dot wang
  2021-06-20 13:43 ` xry111 at mengyan1223 dot wang
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-20 12:41 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|middle-end                  |target

--- Comment #2 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
This seems mips specific.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
  2021-06-19  8:11 ` [Bug middle-end/101132] " xry111 at mengyan1223 dot wang
  2021-06-20 12:41 ` [Bug target/101132] " xry111 at mengyan1223 dot wang
@ 2021-06-20 13:43 ` xry111 at mengyan1223 dot wang
  2021-06-20 13:44 ` xry111 at mengyan1223 dot wang
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-20 13:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

--- Comment #3 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
Another testcase (produced by cvise from mesa-21.1.3):

unsigned float3_to_rgb9e5_gc_0;
util_format_r9g9b9e5_float_pack_rgba_float_dst_row_bc_0;
util_format_r9g9b9e5_float_pack_rgba_float_dst_row() {
  unsigned x;
  char *dst = util_format_r9g9b9e5_float_pack_rgba_float_dst_row;
  for (; x; x += 1) {
    int __trans_tmp_1, maxrgb_0;
    struct {
      unsigned u
    } f, max;
    if (f.u > 800000)
      __trans_tmp_1 = 0;
    else
      __trans_tmp_1 = max.u;
    maxrgb_0 = __trans_tmp_1 > float3_to_rgb9e5_gc_0
                   ?: util_format_r9g9b9e5_float_pack_rgba_float_dst_row_bc_0;
    *dst = maxrgb_0;
    dst += 4;
  }
}

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (2 preceding siblings ...)
  2021-06-20 13:43 ` xry111 at mengyan1223 dot wang
@ 2021-06-20 13:44 ` xry111 at mengyan1223 dot wang
  2021-06-21  6:29 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-20 13:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

--- Comment #4 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
(In reply to Xi Ruoyao from comment #3)
> Another testcase (produced by cvise from mesa-21.1.3):

Flag: -O3 -mmsa -fno-trapping-math

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (3 preceding siblings ...)
  2021-06-20 13:44 ` xry111 at mengyan1223 dot wang
@ 2021-06-21  6:29 ` rguenth at gcc dot gnu.org
  2021-06-21  8:24 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-21  6:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.2
           Keywords|                            |ice-on-valid-code

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (4 preceding siblings ...)
  2021-06-21  6:29 ` rguenth at gcc dot gnu.org
@ 2021-06-21  8:24 ` marxin at gcc dot gnu.org
  2021-06-21  8:26 ` xry111 at mengyan1223 dot wang
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-21  8:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-06-21
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org

--- Comment #5 from Martin Liška <marxin at gcc dot gnu.org> ---
I can take a look.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (5 preceding siblings ...)
  2021-06-21  8:24 ` marxin at gcc dot gnu.org
@ 2021-06-21  8:26 ` xry111 at mengyan1223 dot wang
  2021-06-21  8:28 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-21  8:26 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

--- Comment #6 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
I'm attempting to fix it by adding vec_cmp and vec_cmpu expand into
mips-msa.md.  Bootstrapped on mips64el-linux-gnu and regtest is running.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (6 preceding siblings ...)
  2021-06-21  8:26 ` xry111 at mengyan1223 dot wang
@ 2021-06-21  8:28 ` marxin at gcc dot gnu.org
  2021-06-21 13:44 ` xry111 at mengyan1223 dot wang
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-21  8:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|marxin at gcc dot gnu.org          |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
Oh, great, thanks for working on that.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (7 preceding siblings ...)
  2021-06-21  8:28 ` marxin at gcc dot gnu.org
@ 2021-06-21 13:44 ` xry111 at mengyan1223 dot wang
  2021-07-28  7:07 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-06-21 13:44 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #8 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
Patch: https://gcc.gnu.org/pipermail/gcc-patches/2021-June/573312.html

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (8 preceding siblings ...)
  2021-06-21 13:44 ` xry111 at mengyan1223 dot wang
@ 2021-07-28  7:07 ` rguenth at gcc dot gnu.org
  2021-07-30 16:58 ` cvs-commit at gcc dot gnu.org
  2021-07-30 18:03 ` xry111 at mengyan1223 dot wang
  11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-28  7:07 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|11.2                        |11.3

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 11.2 is being released, retargeting bugs to GCC 11.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (9 preceding siblings ...)
  2021-07-28  7:07 ` rguenth at gcc dot gnu.org
@ 2021-07-30 16:58 ` cvs-commit at gcc dot gnu.org
  2021-07-30 18:03 ` xry111 at mengyan1223 dot wang
  11 siblings, 0 replies; 13+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-30 16:58 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

--- Comment #10 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Xi Ruoyao <xry111@gcc.gnu.org>:

https://gcc.gnu.org/g:45cb789e6adf5d571c574a94b77413c845fed106

commit r12-2629-g45cb789e6adf5d571c574a94b77413c845fed106
Author: Xi Ruoyao <xry111@mengyan1223.wang>
Date:   Sun Jun 20 15:21:39 2021 +0800

    mips: add MSA vec_cmp and vec_cmpu expand pattern [PR101132]

    Middle-end started to emit vec_cmp and vec_cmpu since GCC 11, causing
    ICE on MIPS with MSA enabled.  Add the pattern to prevent it.

    gcc/

            PR target/101132
            * config/mips/mips-protos.h (mips_expand_vec_cmp_expr): Declare.
            * config/mips/mips.c (mips_expand_vec_cmp_expr): New function.
            * config/mips/mips-msa.md (vec_cmp<MSA:mode><mode_i>): New
              expander.
              (vec_cmpu<IMSA:mode><mode_i>): New expander.

    gcc/testsuite/

            PR target/101132
            * gcc.target/mips/pr101132.c: New test.

^ permalink raw reply	[flat|nested] 13+ messages in thread

* [Bug target/101132] [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541
  2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
                   ` (10 preceding siblings ...)
  2021-07-30 16:58 ` cvs-commit at gcc dot gnu.org
@ 2021-07-30 18:03 ` xry111 at mengyan1223 dot wang
  11 siblings, 0 replies; 13+ messages in thread
From: xry111 at mengyan1223 dot wang @ 2021-07-30 18:03 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101132

Xi Ruoyao <xry111 at mengyan1223 dot wang> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #11 from Xi Ruoyao <xry111 at mengyan1223 dot wang> ---
Fixed for trunk and releases/gcc-11.

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2021-07-30 18:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-19  7:54 [Bug middle-end/101132] New: [11/12 regression] [MIPS/MSA] internal compiler error: in do_store_flag, at expr.c:12541 xry111 at mengyan1223 dot wang
2021-06-19  8:11 ` [Bug middle-end/101132] " xry111 at mengyan1223 dot wang
2021-06-20 12:41 ` [Bug target/101132] " xry111 at mengyan1223 dot wang
2021-06-20 13:43 ` xry111 at mengyan1223 dot wang
2021-06-20 13:44 ` xry111 at mengyan1223 dot wang
2021-06-21  6:29 ` rguenth at gcc dot gnu.org
2021-06-21  8:24 ` marxin at gcc dot gnu.org
2021-06-21  8:26 ` xry111 at mengyan1223 dot wang
2021-06-21  8:28 ` marxin at gcc dot gnu.org
2021-06-21 13:44 ` xry111 at mengyan1223 dot wang
2021-07-28  7:07 ` rguenth at gcc dot gnu.org
2021-07-30 16:58 ` cvs-commit at gcc dot gnu.org
2021-07-30 18:03 ` xry111 at mengyan1223 dot wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).