public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
@ 2020-11-03 11:29 acoplan at gcc dot gnu.org
  2020-11-03 11:30 ` [Bug tree-optimization/97693] " acoplan at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-03 11:29 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97693
           Summary: [11 Regression] SVE: ICE in prepare_load_store_mask,
                    at tree-vect-stmts.c since r11-1143-gb05d5563
           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 C testcase:

extern short a[];
int b;
short c, d;
unsigned e() {
  if (c)
    return c;
  return d;
}
void f() {
  for (unsigned g = b; g; g += 6)
    for (_Bool h = 0; h < (_Bool)e(); h = 1)
      a[g] = 1 / b;
}

AArch64 GCC ICEs with -O3 -march=armv8.2-a+sve since
r11-1143-gb05d5563f4be13b4a0d0951375a82adf483973c0. To reproduce:

$ aarch64-elf-gcc -c -O3 -march=armv8.2-a+sve test.c
during GIMPLE pass: vect
test.c: In function 'f':
test.c:9:6: internal compiler error: in prepare_load_store_mask, at
tree-vect-stmts.c:1758
    9 | void f() {
      |      ^
0x106d15f prepare_load_store_mask
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:1758
0x108784a vectorizable_call
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-stmts.c:3440
0x109972f 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:10838
0x109ffbc vect_transform_loop_stmt
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:8933
0x10bd364 vect_transform_loop(_loop_vec_info*, gimple*)
        /home/alecop01/toolchain/src/gcc/gcc/tree-vect-loop.c:9367
0x10e9a7e try_vectorize_loop_1
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1091
0x10ea1ab try_vectorize_loop
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1148
0x10ea585 vectorize_loops()
        /home/alecop01/toolchain/src/gcc/gcc/tree-vectorizer.c:1229
0xf76a5b 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] 8+ messages in thread

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
@ 2020-11-03 11:30 ` acoplan at gcc dot gnu.org
  2020-11-03 12:50 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: acoplan at gcc dot gnu.org @ 2020-11-03 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org
      Known to fail|                            |11.0
   Target Milestone|---                         |11.0
             Target|                            |aarch64

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

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
  2020-11-03 11:30 ` [Bug tree-optimization/97693] " acoplan at gcc dot gnu.org
@ 2020-11-03 12:50 ` rguenth at gcc dot gnu.org
  2020-11-16 16:57 ` rsandifo at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-03 12:50 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rsandifo at gcc dot gnu.org
           Keywords|                            |ice-on-valid-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
Somebody familiar with the prepare_load_store_mask code needs to look (ISTR a
duplicate in the same area).

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

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
  2020-11-03 11:30 ` [Bug tree-optimization/97693] " acoplan at gcc dot gnu.org
  2020-11-03 12:50 ` rguenth at gcc dot gnu.org
@ 2020-11-16 16:57 ` rsandifo at gcc dot gnu.org
  2020-11-16 17:03 ` rsandifo at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-16 16:57 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2020-11-16
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #2 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Mine.

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

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-11-16 16:57 ` rsandifo at gcc dot gnu.org
@ 2020-11-16 17:03 ` rsandifo at gcc dot gnu.org
  2020-11-17 11:52 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-16 17:03 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org

--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Created attachment 49570
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49570&action=edit
Candidate patch

Looks like a vectype argument got dropped during the conversion.
I'm going to test the attached overnight.

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

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-11-16 17:03 ` rsandifo at gcc dot gnu.org
@ 2020-11-17 11:52 ` cvs-commit at gcc dot gnu.org
  2020-11-17 11:55 ` rsandifo at gcc dot gnu.org
  2020-12-30 14:47 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-17 11:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

commit r11-5088-gfcd513df9aa83f30dbd1c34d13c8a0972702ffa1
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Tue Nov 17 11:51:40 2020 +0000

    PR97693: Specify required vectype in vectorizable_call

    The vectorizable_call part of r11-1143 dropped the required
    vectype when moving from vect_get_vec_def_for_operand to
    vect_get_vec_defs_for_operand.  This caused an ICE on the
    testcase for SVE, because we ended up with a non-predicate
    value being passed to a predicate input.

    AFAICT this was the only instance of that happening.  The types
    seemed to get carried forward for all the other converted calls.

    gcc/
            PR tree-optimization/97693
            * tree-vect-stmts.c (vectorizable_call): Pass the required vectype
            to vect_get_vec_defs_for_operand.

    gcc/testsuite/
            PR tree-optimization/97693
            * gcc.dg/vect/pr97693.c: New test.

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

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-11-17 11:52 ` cvs-commit at gcc dot gnu.org
@ 2020-11-17 11:55 ` rsandifo at gcc dot gnu.org
  2020-12-30 14:47 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-11-17 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> changed:

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

--- Comment #5 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
Fixed on trunk.

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

* [Bug tree-optimization/97693] [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563
  2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2020-11-17 11:55 ` rsandifo at gcc dot gnu.org
@ 2020-12-30 14:47 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-12-30 14:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
*** Bug 97850 has been marked as a duplicate of this bug. ***

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

end of thread, other threads:[~2020-12-30 14:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 11:29 [Bug tree-optimization/97693] New: [11 Regression] SVE: ICE in prepare_load_store_mask, at tree-vect-stmts.c since r11-1143-gb05d5563 acoplan at gcc dot gnu.org
2020-11-03 11:30 ` [Bug tree-optimization/97693] " acoplan at gcc dot gnu.org
2020-11-03 12:50 ` rguenth at gcc dot gnu.org
2020-11-16 16:57 ` rsandifo at gcc dot gnu.org
2020-11-16 17:03 ` rsandifo at gcc dot gnu.org
2020-11-17 11:52 ` cvs-commit at gcc dot gnu.org
2020-11-17 11:55 ` rsandifo at gcc dot gnu.org
2020-12-30 14:47 ` rsandifo 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).