public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
@ 2021-06-27  6:50 cnsun at uwaterloo dot ca
  2021-06-28  7:05 ` [Bug tree-optimization/101229] " rguenth at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-06-27  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101229
           Summary: ICE on valid code with -O3 only: in
                    vect_get_vec_defs_for_operand, at
                    tree-vect-stmts.c:1450
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210627 (experimental) [master revision
:18e95d5ce:461f937b47278eaa4ca3c5507c80cca26af4b015] (GCC)

$ cat mutant.c
int a[1024];
foo() {
  for (int i; i; i += 4) {
    int suma = a[i];
    int sumb = a[i + 1];
    int sumc;
    for (unsigned j = 0; j < 77; ++j) {
      suma = (suma ^ i) + 1;
      sumb = (sumb ^ i) + 2;
      sumc = suma ^ i;
    }
    a[i] = suma;
    a[i + 1] = sumb;
    a[i + 2] = sumc;
  }
}

$ gcc-trunk -O3 mutant.c
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | foo() {
      | ^~~
during GIMPLE pass: vect
mutant.c: In function ‘foo’:
mutant.c:2:1: internal compiler error: in vect_get_vec_defs_for_operand, at
tree-vect-stmts.c:1450
0x7b93d3 vect_get_vec_defs_for_operand(vec_info*, _stmt_vec_info*, unsigned
int, tree_node*, vec<tree_node*, va_heap, vl_ptr>*, tree_node*)
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vect-stmts.c:1450
0x1187583 vect_get_vec_defs(vec_info*, _stmt_vec_info*, _slp_tree*, unsigned
int, tree_node*, vec<tree_node*, va_heap, vl_ptr>*, tree_node*, tree_node*,
vec<tree_node*, va_heap, vl_ptr>*, tree_node*, tree_node*, vec<tree_node*,
va_heap, vl_ptr>*, tree_node*, tree_node*, vec<tree_node*, va_heap, vl_ptr>*,
tree_node*)
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vect-stmts.c:1482
0x118766c vect_get_vec_defs(vec_info*, _stmt_vec_info*, _slp_tree*, unsigned
int, tree_node*, vec<tree_node*, va_heap, vl_ptr>*, tree_node*, vec<tree_node*,
va_heap, vl_ptr>*, tree_node*, vec<tree_node*, va_heap, vl_ptr>*, tree_node*,
vec<tree_node*, va_heap, vl_ptr>*)
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vect-stmts.c:1504
0x11adcf4 vectorizable_lc_phi(_loop_vec_info*, _stmt_vec_info*, gimple**,
_slp_tree*)
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vect-loop.c:7732
0x11a337d vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vect-stmts.c:10979
0x11c2f30 vect_transform_loop(_loop_vec_info*, gimple*)
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vect-loop.c:9584
0x11f5bcc try_vectorize_loop_1
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vectorizer.c:1099
0x11f6881 vectorize_loops()
        /tmp/tmp.CuW17uqJjv-gcc-builder/gcc/gcc/tree-vectorizer.c:1238
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] 7+ messages in thread

* [Bug tree-optimization/101229] ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
  2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
@ 2021-06-28  7:05 ` rguenth at gcc dot gnu.org
  2021-06-28  7:28 ` marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-28  7:05 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
          Component|c                           |tree-optimization
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
   Last reconfirmed|                            |2021-06-28
           Keywords|                            |ice-on-valid-code
            Version|tree-ssa                    |12.0
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

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

* [Bug tree-optimization/101229] ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
  2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
  2021-06-28  7:05 ` [Bug tree-optimization/101229] " rguenth at gcc dot gnu.org
@ 2021-06-28  7:28 ` marxin at gcc dot gnu.org
  2021-06-28  9:55 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-28  7:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Just for the record, started with r11-4428-g4a369d199bf2f34e.

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

* [Bug tree-optimization/101229] ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
  2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
  2021-06-28  7:05 ` [Bug tree-optimization/101229] " rguenth at gcc dot gnu.org
  2021-06-28  7:28 ` marxin at gcc dot gnu.org
@ 2021-06-28  9:55 ` cvs-commit at gcc dot gnu.org
  2021-06-28  9:56 ` [Bug tree-optimization/101229] [11 Regression] " rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-06-28  9:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- 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:f80c4eaca0805bc9e68ed944519519c3dd1c12e1

commit r12-1840-gf80c4eaca0805bc9e68ed944519519c3dd1c12e1
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 28 11:05:46 2021 +0200

    tree-optimization/101229 - fix vectorizer SLP hybrid detection with PHIs

    This fixes the missing handling of PHIs in gimple_walk_op which causes
    the new vectorizer SLP hybrid detection scheme to fail.

    2021-06-28  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/101229
            * gimple-walk.c (gimple_walk_op): Handle PHIs.

            * gcc.dg/torture/pr101229.c: New testcase.

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

* [Bug tree-optimization/101229] [11 Regression] ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
  2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
                   ` (2 preceding siblings ...)
  2021-06-28  9:55 ` cvs-commit at gcc dot gnu.org
@ 2021-06-28  9:56 ` rguenth at gcc dot gnu.org
  2021-07-07 14:07 ` cvs-commit at gcc dot gnu.org
  2021-07-07 14:09 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-28  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
      Known to work|                            |12.0
      Known to fail|                            |11.1.0
   Target Milestone|---                         |11.2
            Summary|ICE on valid code with -O3  |[11 Regression] ICE on
                   |only: in                    |valid code with -O3 only:
                   |vect_get_vec_defs_for_opera |in
                   |nd, at                      |vect_get_vec_defs_for_opera
                   |tree-vect-stmts.c:1450      |nd, at
                   |                            |tree-vect-stmts.c:1450

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

* [Bug tree-optimization/101229] [11 Regression] ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
  2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
                   ` (3 preceding siblings ...)
  2021-06-28  9:56 ` [Bug tree-optimization/101229] [11 Regression] " rguenth at gcc dot gnu.org
@ 2021-07-07 14:07 ` cvs-commit at gcc dot gnu.org
  2021-07-07 14:09 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-07-07 14:07 UTC (permalink / raw)
  To: gcc-bugs

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

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

https://gcc.gnu.org/g:bd5391d309efc8533deb04dd0b5a7b8072592c1d

commit r11-8700-gbd5391d309efc8533deb04dd0b5a7b8072592c1d
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 28 11:05:46 2021 +0200

    tree-optimization/101229 - fix vectorizer SLP hybrid detection with PHIs

    This fixes the missing handling of PHIs in gimple_walk_op which causes
    the new vectorizer SLP hybrid detection scheme to fail.

    2021-06-28  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/101229
            * gimple-walk.c (gimple_walk_op): Handle PHIs.

            * gcc.dg/torture/pr101229.c: New testcase.

    (cherry picked from commit f80c4eaca0805bc9e68ed944519519c3dd1c12e1)

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

* [Bug tree-optimization/101229] [11 Regression] ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450
  2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
                   ` (4 preceding siblings ...)
  2021-07-07 14:07 ` cvs-commit at gcc dot gnu.org
@ 2021-07-07 14:09 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-07-07 14:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2021-07-07 14:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27  6:50 [Bug c/101229] New: ICE on valid code with -O3 only: in vect_get_vec_defs_for_operand, at tree-vect-stmts.c:1450 cnsun at uwaterloo dot ca
2021-06-28  7:05 ` [Bug tree-optimization/101229] " rguenth at gcc dot gnu.org
2021-06-28  7:28 ` marxin at gcc dot gnu.org
2021-06-28  9:55 ` cvs-commit at gcc dot gnu.org
2021-06-28  9:56 ` [Bug tree-optimization/101229] [11 Regression] " rguenth at gcc dot gnu.org
2021-07-07 14:07 ` cvs-commit at gcc dot gnu.org
2021-07-07 14:09 ` 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).