public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
@ 2023-12-25 12:08 sjames at gcc dot gnu.org
  2023-12-25 12:09 ` [Bug tree-optimization/113135] " sjames at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-25 12:08 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113135
           Summary: [14 regression] ICE when building unrar (error: PHI
                    node with wrong VUSE on edge from BB 46)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
                CC: tnfchris at gcc dot gnu.org
  Target Milestone: ---

Hit this when building unrar:
```
x86_64-pc-linux-gnu-g++  -O3 -pipe -march=znver2 -fdiagnostics-color=always
-fPIC -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DRAR_SMP -DRARDLL -c
../unpack.cpp
In file included from ../unpack.cpp:14:
../unpack30.cpp: In member function ‘bool Unpack::ReadTables30()’:
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 46
  628 | bool Unpack::ReadTables30()
      |      ^~~~~~
.MEM_409 = PHI <.MEM_214(46)>
expected .MEM_200
../unpack30.cpp:628:6: error: multiple virtual PHI nodes in BB 81
.MEM_283 = PHI <.MEM_200(47)>
.MEM_408 = PHI <.MEM_214(47)>
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 81
.MEM_281 = PHI <.MEM_408(81), .MEM_409(86)>
expected .MEM_283
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 14
.MEM_411 = PHI <.MEM_209(14)>
expected .MEM_387
../unpack30.cpp:628:6: error: multiple virtual PHI nodes in BB 91
.MEM_332 = PHI <.MEM_387(15)>
.MEM_410 = PHI <.MEM_209(15)>
../unpack30.cpp:628:6: error: PHI node with wrong VUSE on edge from BB 91
.MEM_334 = PHI <.MEM_410(91), .MEM_411(96)>
expected .MEM_332
during GIMPLE pass: vect
../unpack30.cpp:628:6: internal compiler error: verify_ssa failed
0x55c82dd33df8 verify_ssa(bool, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-ssa.cc:1203
0x55c82d93f39d execute_function_todo
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/passes.cc:2095
0x55c82d93f830 execute_todo
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/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://bugs.gentoo.org/> for instructions.
make: *** [../makefile:132: unpack.o] Error 1
make: Leaving directory
'/var/tmp/portage/app-arch/unrar-6.2.12-r1/work/unrar/build-lib'
 * ERROR: app-arch/unrar-6.2.12-r1::gentoo failed (compile phase):
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.0.9999/work/gcc-14.0.0.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl,df
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo 14.0.0 p,
commit 2250dc0cc8c46999ad1c1d79b9aeed9056459bb6' --with-gcc-major-version-only
--enable-libstdcxx-time --enable-lto --disable-libstdcxx-pch --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-multilib --with-multilib-list=m32,m64 --disable-fixed-point
--enable-targets=all --enable-libgomp --disable-libssp --disable-libada
--disable-cet --disable-systemtap --disable-valgrind-annotations
--disable-vtable-verify --disable-libvtv --with-zstd --without-isl
--enable-default-pie --enable-host-pie --disable-host-bind-now
--enable-default-ssp
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.0 20231225 (experimental)
0beeddd6b1b1cb41104c4df925323e8fc0437ba8 (Gentoo 14.0.0 p, commit
2250dc0cc8c46999ad1c1d79b9aeed9056459bb6)
```

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

* [Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
  2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
@ 2023-12-25 12:09 ` sjames at gcc dot gnu.org
  2023-12-25 12:10 ` sjames at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-25 12:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 56932
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56932&action=edit
unpack.ii.xz

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

* [Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
  2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
  2023-12-25 12:09 ` [Bug tree-optimization/113135] " sjames at gcc dot gnu.org
@ 2023-12-25 12:10 ` sjames at gcc dot gnu.org
  2023-12-25 15:04 ` sjames at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-25 12:10 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
'g++ -O3 -march=znver2 -c unpack.ii' is enough to repro

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

* [Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
  2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
  2023-12-25 12:09 ` [Bug tree-optimization/113135] " sjames at gcc dot gnu.org
  2023-12-25 12:10 ` sjames at gcc dot gnu.org
@ 2023-12-25 15:04 ` sjames at gcc dot gnu.org
  2023-12-25 15:21 ` sjames at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-25 15:04 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Sam James <sjames at gcc dot gnu.org> ---
Created attachment 56934
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56934&action=edit
reduced.ii

Reduced.

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

* [Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
  2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-12-25 15:04 ` sjames at gcc dot gnu.org
@ 2023-12-25 15:21 ` sjames at gcc dot gnu.org
  2023-12-26 14:06 ` tnfchris at gcc dot gnu.org
  2024-01-12 15:32 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-25 15:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
(In reply to Sam James from comment #3)
> Created attachment 56934 [details]
> reduced.ii
> 
> Reduced.

Interestingly, it seems to ICE as C++, not as C.

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

* [Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
  2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-12-25 15:21 ` sjames at gcc dot gnu.org
@ 2023-12-26 14:06 ` tnfchris at gcc dot gnu.org
  2024-01-12 15:32 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2023-12-26 14:06 UTC (permalink / raw)
  To: gcc-bugs

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

Tamar Christina <tnfchris at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #5 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
dup

*** This bug has been marked as a duplicate of bug 113137 ***

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

* [Bug tree-optimization/113135] [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46)
  2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-12-26 14:06 ` tnfchris at gcc dot gnu.org
@ 2024-01-12 15:32 ` cvs-commit at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-12 15:32 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tamar Christina <tnfchris@gcc.gnu.org>:

https://gcc.gnu.org/g:6cb155a6cf314232248a12bdd395ed4151ae5a28

commit r14-7194-g6cb155a6cf314232248a12bdd395ed4151ae5a28
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Fri Jan 12 15:24:49 2024 +0000

    middle-end: make memory analysis for early break more deterministic
[PR113135]

    Instead of searching for where to move stores to, they should always be in
    exit belonging to the latch.  We can only ever delay stores and even if we
    pick a different exit than the latch one as the main one, effects still
    happen in program order when vectorized.  If we don't move the stores to
the
    latch exit but instead to whever we pick as the "main" exit then we can
    perform incorrect memory accesses (luckily these are trapped by
verify_ssa).

    We used to iterate over the conds and check the loads and stores inside
them.
    However this relies on the conds being ordered in program order. 
Additionally
    if there is a basic block between two conds we would not have analyzed it.

    Instead this now walks from the preds of the destination basic block up to
the
    loop header and analyzes every block along the way.  As a later
optimization we
    could stop as soon as we've seen all the BBs we have conds for.  For now
the
    header will always contain the first cond, but this can change when we
support
    arbitrary control flow.

    gcc/ChangeLog:

            PR tree-optimization/113135
            * tree-vect-data-refs.cc (vect_analyze_early_break_dependences):
Rework
            dependency analysis.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/113135
            * gcc.dg/vect/vect-early-break_103-pr113135.c: New test.

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

end of thread, other threads:[~2024-01-12 15:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-25 12:08 [Bug tree-optimization/113135] New: [14 regression] ICE when building unrar (error: PHI node with wrong VUSE on edge from BB 46) sjames at gcc dot gnu.org
2023-12-25 12:09 ` [Bug tree-optimization/113135] " sjames at gcc dot gnu.org
2023-12-25 12:10 ` sjames at gcc dot gnu.org
2023-12-25 15:04 ` sjames at gcc dot gnu.org
2023-12-25 15:21 ` sjames at gcc dot gnu.org
2023-12-26 14:06 ` tnfchris at gcc dot gnu.org
2024-01-12 15:32 ` cvs-commit 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).