public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
@ 2021-08-08 19:25 marxin at gcc dot gnu.org
  2021-08-09  7:38 ` [Bug target/101819] " rguenth at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-08 19:25 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101819
           Summary: [12 Regression] ICE in expand_expr_real_2, at
                    expr.c:9552 since
                    r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: riscv64-unknown-linux-gnu

The following fails:

$ ./xgcc -B.
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
-ftree-loop-vectorize -O1 -S
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c:
In function ‘f2’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c:24:10:
internal compiler error: in expand_expr_real_2, at expr.c:9552
   24 |     d[i] = b[i] / 3;
      |     ~~~~~^~~~~~~~~~
0xdd51c5 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/marxin/Programming/gcc2/gcc/expr.c:9552
0xdd91fb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:10480
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdb0813 expand_expr
        /home/marxin/Programming/gcc2/gcc/expr.h:301
0xdd60ef expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/marxin/Programming/gcc2/gcc/expr.c:9780
0xdd91fb expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:10480
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdb0848 expand_normal
        /home/marxin/Programming/gcc2/gcc/expr.h:307
0xdcc54a store_field
        /home/marxin/Programming/gcc2/gcc/expr.c:7439
0xdc8875 store_constructor_field
        /home/marxin/Programming/gcc2/gcc/expr.c:6672
0xdcb9fe store_constructor
        /home/marxin/Programming/gcc2/gcc/expr.c:7289
0xdd14b4 expand_constructor
        /home/marxin/Programming/gcc2/gcc/expr.c:8634
0xddaad0 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:10819
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdd923f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:10484
0xdd1573 expand_expr_real(tree_node*, rtx_def*, machine_mode, expand_modifier,
rtx_def**, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:8713
0xdc658f store_expr(tree_node*, rtx_def*, int, bool, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:6064
0xdc4e24 expand_assignment(tree_node*, tree_node*, bool)
        /home/marxin/Programming/gcc2/gcc/expr.c:5796
0xc3a209 expand_gimple_stmt_1
        /home/marxin/Programming/gcc2/gcc/cfgexpand.c:3945
0xc3a5fe expand_gimple_stmt
        /home/marxin/Programming/gcc2/gcc/cfgexpand.c:4043
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.

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

* [Bug target/101819] [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
  2021-08-08 19:25 [Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf marxin at gcc dot gnu.org
@ 2021-08-09  7:38 ` rguenth at gcc dot gnu.org
  2021-08-10  8:04 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-09  7:38 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2021-08-09
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Target Milestone|---                         |12.0

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.  There's some other fallout as well.

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

* [Bug target/101819] [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
  2021-08-08 19:25 [Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf marxin at gcc dot gnu.org
  2021-08-09  7:38 ` [Bug target/101819] " rguenth at gcc dot gnu.org
@ 2021-08-10  8:04 ` marxin at gcc dot gnu.org
  2021-08-10  8:12 ` cvs-commit at gcc dot gnu.org
  2021-08-10  8:13 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-10  8:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Happens also on x86_64:

$ gcc /home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/vect/pr51581-3.c
-mno-mmx -Ofast -mno-sse -c
during RTL pass: expand
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/vect/pr51581-3.c: In function
‘f2’:
/home/marxin/Programming/gcc/gcc/testsuite/gcc.dg/vect/pr51581-3.c:22:1:
internal compiler error: in expand_expr_real_2, at expr.c:9552
   22 | f2 (void)
      | ^~
0x6a17bb expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/marxin/Programming/gcc/gcc/expr.c:9552
0xb1d086 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:10480
0xb167a8 expand_expr
        /home/marxin/Programming/gcc/gcc/expr.h:301
0xb167a8 expand_expr_real_2(separate_ops*, rtx_def*, machine_mode,
expand_modifier)
        /home/marxin/Programming/gcc/gcc/expr.c:9780
0xb1d086 expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:10480
0xb2d76a expand_normal
        /home/marxin/Programming/gcc/gcc/expr.h:307
0xb2d76a store_field
        /home/marxin/Programming/gcc/gcc/expr.c:7439
0xb2cfa5 store_constructor
        /home/marxin/Programming/gcc/gcc/expr.c:7289
0xb2e6bd expand_constructor
        /home/marxin/Programming/gcc/gcc/expr.c:8634
0xb1c32a expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:10819
0xb278a6 store_expr(tree_node*, rtx_def*, int, bool, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:6064
0xb29dad expand_assignment(tree_node*, tree_node*, bool)
        /home/marxin/Programming/gcc/gcc/expr.c:5796
0x9ecffa expand_gimple_stmt_1
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:3945
0x9ecffa expand_gimple_stmt
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:4043
0x9f3950 expand_gimple_basic_block
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:6085
0x9f58c7 execute
        /home/marxin/Programming/gcc/gcc/cfgexpand.c:6811
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.

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

* [Bug target/101819] [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
  2021-08-08 19:25 [Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf marxin at gcc dot gnu.org
  2021-08-09  7:38 ` [Bug target/101819] " rguenth at gcc dot gnu.org
  2021-08-10  8:04 ` marxin at gcc dot gnu.org
@ 2021-08-10  8:12 ` cvs-commit at gcc dot gnu.org
  2021-08-10  8:13 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-08-10  8:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:19d1a529fa9f78e7ec7be38d423c90e00cec8f8c

commit r12-2832-g19d1a529fa9f78e7ec7be38d423c90e00cec8f8c
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Aug 9 11:42:47 2021 +0200

    tree-optimization/101801 - rework generic vector vectorization more

    This builds ontop of the vect_worthwhile_without_simd_p refactoring
    done earlier.  It was wrong in dropping the appearant double checks
    for operation support since the optab check can happen with an
    integer vector emulation mode and thus succeed but vector lowering
    might not actually support the operation on word_mode.

    The following patch adds a vect_emulated_vector_p helper and
    re-instantiates the check where it was previously.  It also adds
    appropriate costing of the scalar stmts emitted by vector lowering
    to vectorizable_operation which should be the only place such
    operations are synthesized.  I've also cared for the case where
    the vector mode is supported but the operation is not (though
    I think this will be unlikely given we're talking about plus, minus
    and negate).

    This fixes the observed FAIL of gcc.dg/tree-ssa/gen-vect-11b.c
    with -m32 where we end up vectorizing a multiplication that ends up
    being teared down to scalars again by vector lowering.

    I'm not super happy about all the other places where we're now
    and previously feeding scalar modes to optab checks where we
    want to know whether we can vectorize sth but well.

    2021-09-08  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/101801
            PR tree-optimization/101819
            * tree-vectorizer.h (vect_emulated_vector_p): Declare.
            * tree-vect-loop.c (vect_emulated_vector_p): New function.
            (vectorizable_reduction): Re-instantiate a check for emulated
            operations.
            * tree-vect-stmts.c (vectorizable_shift): Likewise.
            (vectorizable_operation): Likewise.  Cost emulated vector
            operations according to the scalar sequence synthesized by
            vector lowering.

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

* [Bug target/101819] [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf
  2021-08-08 19:25 [Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-08-10  8:12 ` cvs-commit at gcc dot gnu.org
@ 2021-08-10  8:13 ` rguenth at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-08-10  8:13 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-08-10  8:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-08 19:25 [Bug target/101819] New: [12 Regression] ICE in expand_expr_real_2, at expr.c:9552 since r12-2789-gf31da42e047e8018ca6ad9809273bc7efb6ffcaf marxin at gcc dot gnu.org
2021-08-09  7:38 ` [Bug target/101819] " rguenth at gcc dot gnu.org
2021-08-10  8:04 ` marxin at gcc dot gnu.org
2021-08-10  8:12 ` cvs-commit at gcc dot gnu.org
2021-08-10  8:13 ` rguenth at gcc dot gnu.org

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).