public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116
@ 2020-11-06 19:40 dcb314 at hotmail dot com
  2020-11-07 16:44 ` [Bug c/97746] " zhendong.su at inf dot ethz.ch
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: dcb314 at hotmail dot com @ 2020-11-06 19:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97746
           Summary: ice in vect_init_pattern_stmt, at
                    tree-vect-patterns.c:116
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

int a, b, c;
extern int k(void);
extern int l(void);
void main(void) {
  char *d, *e, f = 1, g = 1;
  char h = 0, i, j = 0;
  while (k()) {
    j++;
    h = 1;
  }
  while (a <= 0) {
    if (a)
      f = 0;
    if (j)
      i = 1;
    if (h)
      e[0] = e[1] = b;
    if (i && d && h == 0)
      i = 0;
    if (f)
      g = 2;
    if (i && d)
      for (; c < g;)
        if (l())
          return;
  }
}

compiled by recent gcc trunk and compiler flag -O3 -march=bdver2,
does this:

uring GIMPLE pass: slp
bug668.c: In function ‘main’:
bug668.c:4:6: internal compiler error: in vect_init_pattern_stmt, at
tree-vect-p
atterns.c:116
    4 | void main(void) {
      |      ^~~~
0x18acdd4 vect_init_pattern_stmt(vec_info*, gimple*, _stmt_vec_info*,
tree_node*
)
        ../../trunk.git/gcc/tree-vect-patterns.c:115
0x18ac829 vect_set_pattern_stmt(vec_info*, gimple*, _stmt_vec_info*,
tree_node*)
        ../../trunk.git/gcc/tree-vect-patterns.c:133

The bug first seems to appear between 20201105 and 20201106.

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

* [Bug c/97746] ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116
  2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
@ 2020-11-07 16:44 ` zhendong.su at inf dot ethz.ch
  2020-11-09  8:00 ` [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd marxin at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: zhendong.su at inf dot ethz.ch @ 2020-11-07 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

Zhendong Su <zhendong.su at inf dot ethz.ch> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |zhendong.su at inf dot ethz.ch

--- Comment #1 from Zhendong Su <zhendong.su at inf dot ethz.ch> ---
Another reproducer for the same crash with "-O1 -ftree-slp-vectorize": 

[566] % gcctk -O1 -ftree-slp-vectorize small.c
during GIMPLE pass: slp
small.c: In function ‘d’:
small.c:6:6: internal compiler error: in vect_init_pattern_stmt, at
tree-vect-patterns.c:116
    6 | void d() {
      |      ^
0x18be859 vect_init_pattern_stmt
        ../../gcc-trunk/gcc/tree-vect-patterns.c:115
0x18bfeee vect_set_pattern_stmt
        ../../gcc-trunk/gcc/tree-vect-patterns.c:133
0x18bfeee vect_mark_pattern_stmts
        ../../gcc-trunk/gcc/tree-vect-patterns.c:5327
0x18bfeee vect_pattern_recog_1
        ../../gcc-trunk/gcc/tree-vect-patterns.c:5443
0x18c86e1 vect_pattern_recog(vec_info*)
        ../../gcc-trunk/gcc/tree-vect-patterns.c:5583
0x10054a2 vect_slp_analyze_bb_1
        ../../gcc-trunk/gcc/tree-vect-slp.c:4124
0x10054a2 vect_slp_region
        ../../gcc-trunk/gcc/tree-vect-slp.c:4226
0x1006a8a vect_slp_bbs
        ../../gcc-trunk/gcc/tree-vect-slp.c:4374
0x1006fcc vect_slp_function(function*)
        ../../gcc-trunk/gcc/tree-vect-slp.c:4460
0x10090f2 execute
        ../../gcc-trunk/gcc/tree-vectorizer.c:1437
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.
[567] %
[567] % cat small.c
int a, b;
short c;

extern void f (short*);

void d() {
  short e[2] = {0, 0};
  while (a) {
    f(e);
    int g = 0 || a, h = 8 && c;
    short i = c;
    c = h & g;
    if (b)
      b = g || i;
  }
}

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

* [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd
  2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
  2020-11-07 16:44 ` [Bug c/97746] " zhendong.su at inf dot ethz.ch
@ 2020-11-09  8:00 ` marxin at gcc dot gnu.org
  2020-11-09  8:06 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-09  8:00 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|c                           |tree-optimization
      Known to work|                            |10.2.0
   Last reconfirmed|                            |2020-11-09
            Version|unknown                     |11.0
            Summary|ice in                      |[11 Regression] ICE in
                   |vect_init_pattern_stmt, at  |vect_init_pattern_stmt, at
                   |tree-vect-patterns.c:116    |tree-vect-patterns.c:115
                   |                            |since
                   |                            |r11-4787-g22175d0dc6a89ddd
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
      Known to fail|                            |11.0
   Target Milestone|---                         |11.0
     Ever confirmed|0                           |1
           Priority|P3                          |P1

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Confirmed, started with r11-4787-g22175d0dc6a89ddd.

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

* [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd
  2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
  2020-11-07 16:44 ` [Bug c/97746] " zhendong.su at inf dot ethz.ch
  2020-11-09  8:00 ` [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd marxin at gcc dot gnu.org
@ 2020-11-09  8:06 ` rguenth at gcc dot gnu.org
  2020-11-09  8:18 ` marxin at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-09  8:06 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd
  2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2020-11-09  8:06 ` rguenth at gcc dot gnu.org
@ 2020-11-09  8:18 ` marxin at gcc dot gnu.org
  2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
  2020-11-09 13:58 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-11-09  8:18 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Blocks|                            |26163

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
I can see the ICE in 526.blender_r.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

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

* [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd
  2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
                   ` (3 preceding siblings ...)
  2020-11-09  8:18 ` marxin at gcc dot gnu.org
@ 2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
  2020-11-09 13:58 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-09 13:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 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:ec735bc7646500570d9d6e45ef335e6d547b1433

commit r11-4835-gec735bc7646500570d9d6e45ef335e6d547b1433
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Nov 9 13:55:11 2020 +0100

    tree-optimization/97746 - fix order of mask precision computes

    This fixes the order of walking PHIs and stmts for BB mask
    precision compute.

    2020-11-09  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/97746
            * tree-vect-patterns.c (vect_determine_precisions): First walk
PHIs.

            * gcc.dg/vect/bb-slp-pr97746.c: New testcase.

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

* [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd
  2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
                   ` (4 preceding siblings ...)
  2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
@ 2020-11-09 13:58 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-09 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-11-09 13:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-06 19:40 [Bug c/97746] New: ice in vect_init_pattern_stmt, at tree-vect-patterns.c:116 dcb314 at hotmail dot com
2020-11-07 16:44 ` [Bug c/97746] " zhendong.su at inf dot ethz.ch
2020-11-09  8:00 ` [Bug tree-optimization/97746] [11 Regression] ICE in vect_init_pattern_stmt, at tree-vect-patterns.c:115 since r11-4787-g22175d0dc6a89ddd marxin at gcc dot gnu.org
2020-11-09  8:06 ` rguenth at gcc dot gnu.org
2020-11-09  8:18 ` marxin at gcc dot gnu.org
2020-11-09 13:57 ` cvs-commit at gcc dot gnu.org
2020-11-09 13:58 ` 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).