public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
@ 2020-09-18 11:19 acoplan at gcc dot gnu.org
  2020-09-18 11:20 ` [Bug tree-optimization/97104] " acoplan at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-09-18 11:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97104
           Summary: [11 Regression] aarch64, SVE: ICE in
                    vect_get_loop_mask since r11-3070-g783dc66f9cc
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: acoplan at gcc dot gnu.org
  Target Milestone: ---

For the following testcase:

int a, b, c, d;
short e;
void f() {
  unsigned g;
  for (; d; d++) {
    g = c == 0 ? 1 : b / c;
    e = a ? g : a;
  }
}

AArch64 GCC ICEs at -O1 or -O2 with -ftree-vectorize -march=armv8.2-a+sve since
r11-3070-g783dc66f9ccb0019c3dad2701bb9110286758d70:

commit 783dc66f9ccb0019c3dad2701bb9110286758d70 (HEAD)
Author: Richard Biener <rguenther@suse.de>
Date:   Wed Sep 9 09:36:46 2020

    enable live condition vectorization

To reproduce:

$ aarch64-none-elf-gcc -O2 -ftree-vectorize -march=armv8.2-a+sve test.c
during GIMPLE pass: vect
test.c: In function 'f':
test.c:3:6: internal compiler error: in operator[], at vec.h:880
    3 | void f() {
      |      ^
0x10637d9 vec<rgroup_controls, va_heap, vl_embed>::operator[](unsigned int)
        /home/alecop01/toolchain/src/gcc/gcc/vec.h:880
0x10637d9 vec<rgroup_controls, va_heap, vl_ptr>::operator[](unsigned int)
        /home/alecop01/toolchain/src/gcc/gcc/vec.h:1451
0x10637d9 vect_get_loop_mask(gimple_stmt_iterator*, auto_vec<rgroup_controls,
0ul>*, unsigned int, tree_node*, unsigned int)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:8487
0x1044e00 vectorizable_condition
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:10216
0x105a73e vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:10859
0x1061099 vect_transform_loop_stmt
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:8700
0x107db5d vect_transform_loop(_loop_vec_info*, gimple*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:9134
0x10a3c34 try_vectorize_loop_1
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1094
0x10a43b6 try_vectorize_loop
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1151
0x10a46f0 vectorize_loops()
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1230
0xf392f7 execute
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop.c:414
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] 10+ messages in thread

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
@ 2020-09-18 11:20 ` acoplan at gcc dot gnu.org
  2020-09-18 12:04 ` rguenth at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-09-18 11:20 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
             Target|                            |aarch64
   Target Milestone|---                         |11.0
      Known to fail|                            |11.0

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
  2020-09-18 11:20 ` [Bug tree-optimization/97104] " acoplan at gcc dot gnu.org
@ 2020-09-18 12:04 ` rguenth at gcc dot gnu.org
  2020-10-16 12:09 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-18 12:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
possibly latent if you turn the live operation into one stored to a loop
variant  and vectorized location - the loop wasn't vectorized before the cited
rev.

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
  2020-09-18 11:20 ` [Bug tree-optimization/97104] " acoplan at gcc dot gnu.org
  2020-09-18 12:04 ` rguenth at gcc dot gnu.org
@ 2020-10-16 12:09 ` rguenth at gcc dot gnu.org
  2020-11-05  9:49 ` acoplan at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-10-16 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-10-16 12:09 ` rguenth at gcc dot gnu.org
@ 2020-11-05  9:49 ` acoplan at gcc dot gnu.org
  2020-12-10 17:00 ` akrl at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-05  9:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Alex Coplan <acoplan at gcc dot gnu.org> ---
For the related testcase:

int a, c, d, e;
long b;
void f() {
  short g = a;
  for (; c; c++) {
    b &= a == 0 ? 1 : g / a;
    d |= e;
  }
}

with the same options on AArch64, we ICE with a similar (but not identical)
backtrace:

during GIMPLE pass: vect
test.c: In function 'f':
test.c:3:6: internal compiler error: in vect_get_loop_mask, at
tree-vect-loop.c:8868
    3 | void f() {
      |      ^
0x10a45cc vect_get_loop_mask(gimple_stmt_iterator*, auto_vec<rgroup_controls,
0ul>*, unsigned int, tree_node*, unsigned int)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:8867
0x1085843 vectorizable_condition
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:10195
0x109b040 vect_transform_stmt(vec_info*, _stmt_vec_info*,
gimple_stmt_iterator*, _slp_tree*, _slp_instance*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:10831
0x10a1eb3 vect_transform_loop_stmt
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:9053
0x10bee28 vect_transform_loop(_loop_vec_info*, gimple*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:9475
0x10eb324 try_vectorize_loop_1
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1091
0x10eba51 try_vectorize_loop
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1148
0x10ebe2b vectorize_loops()
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1229
0xf7843d execute
        /home/alecop01/toolchain/src/gcc/gcc/tree-ssa-loop.c:414
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] 10+ messages in thread

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-11-05  9:49 ` acoplan at gcc dot gnu.org
@ 2020-12-10 17:00 ` akrl at gcc dot gnu.org
  2021-01-14 16:13 ` acoplan at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: akrl at gcc dot gnu.org @ 2020-12-10 17:00 UTC (permalink / raw)
  To: gcc-bugs

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

akrl at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-12-10 17:00 ` akrl at gcc dot gnu.org
@ 2021-01-14 16:13 ` acoplan at gcc dot gnu.org
  2021-03-09 14:24 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-01-14 16:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Seems to have gone latent for the previous testcases, but still ICEs for:

extern int a[];
extern long b[];
char c;
long d;
void e(_Bool f[], long g[]) {
  for (int h; h; h += 1) {
    a[h] = c < f[0];
    b[h] = d ? d : g[h];
  }
}

with -O1 -ftree-vectorize -march=armv8.2-a+sve.

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-01-14 16:13 ` acoplan at gcc dot gnu.org
@ 2021-03-09 14:24 ` rguenth at gcc dot gnu.org
  2021-03-09 14:25 ` acoplan at gcc dot gnu.org
  2021-03-09 14:57 ` acoplan at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-09 14:24 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marxin at gcc dot gnu.org,
                   |                            |rsandifo at gcc dot gnu.org
           Keywords|                            |needs-bisection

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Also gone latent (or fixed) now.  I also know nothing about the loop masks
code.

Extracting a GIMPLE testcase from one of the broken revs maybe carries this
over.

We're vectorizing the last testcase with SVE now and not ICEing.  So maybe it
was really fixed, who knows (but I don't see any live stmts).

Can somebody bisect what fixed this?

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-03-09 14:24 ` rguenth at gcc dot gnu.org
@ 2021-03-09 14:25 ` acoplan at gcc dot gnu.org
  2021-03-09 14:57 ` acoplan at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-09 14:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Alex Coplan <acoplan at gcc dot gnu.org> ---
I have a bisect in progress.

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

* [Bug tree-optimization/97104] [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc
  2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-03-09 14:25 ` acoplan at gcc dot gnu.org
@ 2021-03-09 14:57 ` acoplan at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: acoplan at gcc dot gnu.org @ 2021-03-09 14:57 UTC (permalink / raw)
  To: gcc-bugs

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

Alex Coplan <acoplan at gcc dot gnu.org> changed:

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

--- Comment #6 from Alex Coplan <acoplan at gcc dot gnu.org> ---
Fixed by Andre's r11-7135-g40c92180df970143249f3cd5056f8fb48a4d9333:

commit 40c92180df970143249f3cd5056f8fb48a4d9333
Author: Andre Vieira <andre.simoesdiasvieira@arm.com>
Date:   Mon Feb 8 16:04:18 2021 +0000

    middle-end/98974 - fixup after STMT_VINFO_VEC_STMTS rework

    This fixes up the nvectors parameter passed to vect_get_loop_mask in
    vectorizable_condition after the STMT_VINFO_VEC_STMTS rework.

so closing as fixed.

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

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

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-18 11:19 [Bug tree-optimization/97104] New: [11 Regression] aarch64, SVE: ICE in vect_get_loop_mask since r11-3070-g783dc66f9cc acoplan at gcc dot gnu.org
2020-09-18 11:20 ` [Bug tree-optimization/97104] " acoplan at gcc dot gnu.org
2020-09-18 12:04 ` rguenth at gcc dot gnu.org
2020-10-16 12:09 ` rguenth at gcc dot gnu.org
2020-11-05  9:49 ` acoplan at gcc dot gnu.org
2020-12-10 17:00 ` akrl at gcc dot gnu.org
2021-01-14 16:13 ` acoplan at gcc dot gnu.org
2021-03-09 14:24 ` rguenth at gcc dot gnu.org
2021-03-09 14:25 ` acoplan at gcc dot gnu.org
2021-03-09 14:57 ` acoplan 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).