public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
@ 2024-01-13  7:40 zsojka at seznam dot cz
  2024-01-13 23:28 ` [Bug tree-optimization/113371] " pinskia at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: zsojka at seznam dot cz @ 2024-01-13  7:40 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113371
           Summary: [14 Regression] ICE: verify_ssa failed: PHI node with
                    wrong VUSE on edge from BB 19 with -O
                    -march=silvermont -ftree-vectorize
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: zsojka at seznam dot cz
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

Created attachment 57067
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57067&action=edit
reduced testcase

Compiler output:
$ x86_64-pc-linux-gnu-gcc -O -march=silvermont -ftree-vectorize testcase.c 
testcase.c: In function 'BN_uadd':
testcase.c:4:1: error: PHI node with wrong VUSE on edge from BB 19
    4 | BN_uadd (int dif, long t1)
      | ^~~~~~~
.MEM_125 = PHI <.MEM_8(D)(19)>
expected .MEM_45
during GIMPLE pass: vect
testcase.c:4:1: internal compiler error: verify_ssa failed
0x177532f verify_ssa(bool, bool)
        /repo/gcc-trunk/gcc/tree-ssa.cc:1203
0x13c8545 execute_function_todo
        /repo/gcc-trunk/gcc/passes.cc:2095
0x13c89ae execute_todo
        /repo/gcc-trunk/gcc/passes.cc:2142
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

$ x86_64-pc-linux-gnu-gcc -v
Using built-in specs.
COLLECT_GCC=/repo/gcc-trunk/binary-latest-amd64/bin/x86_64-pc-linux-gnu-gcc
COLLECT_LTO_WRAPPER=/repo/gcc-trunk/binary-trunk-r14-7215-20240112190107-g8b447fa89d5-checking-yes-rtl-df-extra-nobootstrap-amd64/bin/../libexec/gcc/x86_64-pc-linux-gnu/14.0.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /repo/gcc-trunk//configure --enable-languages=c,c++
--enable-valgrind-annotations --disable-nls --enable-checking=yes,rtl,df,extra
--disable-bootstrap --with-cloog --with-ppl --with-isl
--build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu
--target=x86_64-pc-linux-gnu --with-ld=/usr/bin/x86_64-pc-linux-gnu-ld
--with-as=/usr/bin/x86_64-pc-linux-gnu-as --disable-libstdcxx-pch
--prefix=/repo/gcc-trunk//binary-trunk-r14-7215-20240112190107-g8b447fa89d5-checking-yes-rtl-df-extra-nobootstrap-amd64
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240112 (experimental) (GCC)

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
@ 2024-01-13 23:28 ` pinskia at gcc dot gnu.org
  2024-01-13 23:31 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-13 23:28 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
                 CC|                            |pinskia at gcc dot gnu.org

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
  2024-01-13 23:28 ` [Bug tree-optimization/113371] " pinskia at gcc dot gnu.org
@ 2024-01-13 23:31 ` pinskia at gcc dot gnu.org
  2024-01-15  8:31 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-13 23:31 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-01-13
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed but note the reduced testcase depends on an uninitialized variable.

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
  2024-01-13 23:28 ` [Bug tree-optimization/113371] " pinskia at gcc dot gnu.org
  2024-01-13 23:31 ` pinskia at gcc dot gnu.org
@ 2024-01-15  8:31 ` rguenth at gcc dot gnu.org
  2024-01-15  8:53 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-15  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed, it's a recent regression.

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2024-01-15  8:31 ` rguenth at gcc dot gnu.org
@ 2024-01-15  8:53 ` jakub at gcc dot gnu.org
  2024-01-15  9:08 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-15  8:53 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Like in PR113374, started to ICE with one message in
r14-7194-g6cb155a6cf314232248a12bdd395ed4151ae5a28, another one in
r14-7195-g411de96dbf2bdafc7a90ebbfc63e68afd6388d29 and yet another one
r14-7196-g99c0a540d6689ede068f9ba98af6f38c3cd71362 which is what we get until
latest trunk.

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2024-01-15  8:53 ` jakub at gcc dot gnu.org
@ 2024-01-15  9:08 ` jakub at gcc dot gnu.org
  2024-01-16 12:14 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-15  9:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
The https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113364#c9 patch doesn't fix
this.

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2024-01-15  9:08 ` jakub at gcc dot gnu.org
@ 2024-01-16 12:14 ` rguenth at gcc dot gnu.org
  2024-01-17  8:23 ` cvs-commit at gcc dot gnu.org
  2024-01-17  8:23 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-16 12:14 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
I think we're doing sth unsupported - prologue peeling for
LOOP_VINFO_EARLY_BREAKS_VECT_PEELED.  The problem is that we only late
decide whether we do vect_use_loop_mask_for_alignment_p and I'm not sure
whether that variant works.

Testing a simple patch.

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
                   ` (5 preceding siblings ...)
  2024-01-16 12:14 ` rguenth at gcc dot gnu.org
@ 2024-01-17  8:23 ` cvs-commit at gcc dot gnu.org
  2024-01-17  8:23 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-17  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC 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:3359942417b02de88ae84d50aac232ac01ff9e15

commit r14-8175-g3359942417b02de88ae84d50aac232ac01ff9e15
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jan 16 13:09:27 2024 +0100

    tree-optimization/113371 - avoid prologue peeling for peeled early exits

    The following avoids prologue peeling when doing early exit
    vectorization with the IV exit before the early exit.  That's because
    we it invalidates the invariant that the effective latch of the loop
    is empty causing wrong continuation to the main loop.  In particular
    this is prone to break virtual SSA form.

            PR tree-optimization/113371
            * tree-vect-data-refs.cc (vect_enhance_data_refs_alignment):
            Do not peel when LOOP_VINFO_EARLY_BREAKS_VECT_PEELED.
            * tree-vect-loop-manip.cc (vect_do_peeling): Assert we do
            not perform prologue peeling when
LOOP_VINFO_EARLY_BREAKS_VECT_PEELED.

            * gcc.dg/vect/pr113371.c: New testcase.

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

* [Bug tree-optimization/113371] [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize
  2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
                   ` (6 preceding siblings ...)
  2024-01-17  8:23 ` cvs-commit at gcc dot gnu.org
@ 2024-01-17  8:23 ` rguenth at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-17  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2024-01-17  8:23 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-13  7:40 [Bug tree-optimization/113371] New: [14 Regression] ICE: verify_ssa failed: PHI node with wrong VUSE on edge from BB 19 with -O -march=silvermont -ftree-vectorize zsojka at seznam dot cz
2024-01-13 23:28 ` [Bug tree-optimization/113371] " pinskia at gcc dot gnu.org
2024-01-13 23:31 ` pinskia at gcc dot gnu.org
2024-01-15  8:31 ` rguenth at gcc dot gnu.org
2024-01-15  8:53 ` jakub at gcc dot gnu.org
2024-01-15  9:08 ` jakub at gcc dot gnu.org
2024-01-16 12:14 ` rguenth at gcc dot gnu.org
2024-01-17  8:23 ` cvs-commit at gcc dot gnu.org
2024-01-17  8:23 ` 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).