public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
@ 2023-12-26  6:55 sjames at gcc dot gnu.org
  2023-12-26  6:55 ` [Bug tree-optimization/113144] " sjames at gcc dot gnu.org
                   ` (16 more replies)
  0 siblings, 17 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-26  6:55 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113144
           Summary: [14 regression] ICE when building dpkg-1.21.15 in
                    verify_dominators (error: dominator of 9 should be 48,
                    not 12)
           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
  Target Milestone: ---

Good morning!

Hit this when building dpkg-1.21.15:

```
$ gcc -c tarfn.i -O3 -march=znver2
tarfn.c: In function ‘tar_atosl’:
tarfn.c:195:1: error: dominator of 9 should be 48, not 12
during GIMPLE pass: vect
tarfn.c:195:1: internal compiler error: in verify_dominators, at
dominance.cc:1194
0x561a07fcf5ea verify_dominators(cdi_direction)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/dominance.cc:1194
0x561a091d1199 checking_verify_dominators(cdi_direction)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/dominance.h:76
0x561a091d1199 slpeel_tree_duplicate_loop_to_edge_cfg(loop*, edge_def*, loop*,
edge_def*, edge_def*, edge_def**, bool, vec<basic_block_def*, va_heap,
vl_ptr>*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vect-loop-manip.cc:1846
0x561a091d3b38 vect_do_peeling(_loop_vec_info*, tree_node*, tree_node*,
tree_node**, tree_node**, tree_node**, int, bool, bool, tree_node**)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vect-loop-manip.cc:3307
0x561a091c2dd7 vect_transform_loop(_loop_vec_info*, gimple*)
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vect-loop.cc:11911
0x561a0920b2f2 vect_transform_loops
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vectorizer.cc:1006
0x561a0920b956 try_vectorize_loop_1
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vectorizer.cc:1152
0x561a0920b956 try_vectorize_loop
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vectorizer.cc:1182
0x561a0920bf74 execute
       
/usr/src/debug/sys-devel/gcc-14.0.0.9999/gcc-14.0.0.9999/gcc/tree-vectorizer.cc:1298
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.
```

```
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] 18+ messages in thread

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
@ 2023-12-26  6:55 ` sjames at gcc dot gnu.org
  2023-12-26  7:01 ` sjames at gcc dot gnu.org
                   ` (15 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-26  6:55 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
  2023-12-26  6:55 ` [Bug tree-optimization/113144] " sjames at gcc dot gnu.org
@ 2023-12-26  7:01 ` sjames at gcc dot gnu.org
  2023-12-26 14:14 ` tnfchris at gcc dot gnu.org
                   ` (14 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-12-26  7:01 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
  2023-12-26  6:55 ` [Bug tree-optimization/113144] " sjames at gcc dot gnu.org
  2023-12-26  7:01 ` sjames at gcc dot gnu.org
@ 2023-12-26 14:14 ` tnfchris at gcc dot gnu.org
  2023-12-26 14:28 ` tnfchris at gcc dot gnu.org
                   ` (13 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2023-12-26 14:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
loop has weird shape, peeling should have recalculated all dominators but seems
to have missed one.

Will fix tomorrow when back at work.

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-12-26 14:14 ` tnfchris at gcc dot gnu.org
@ 2023-12-26 14:28 ` tnfchris at gcc dot gnu.org
  2023-12-27 11:54 ` tnfchris at gcc dot gnu.org
                   ` (12 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2023-12-26 14:28 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
           Assignee|unassigned at gcc dot gnu.org      |tnfchris at gcc dot gnu.org
   Last reconfirmed|                            |2023-12-26
             Status|UNCONFIRMED                 |ASSIGNED
   Target Milestone|---                         |14.0
     Ever confirmed|0                           |1

--- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Thanks for the report and testcases.

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-12-26 14:28 ` tnfchris at gcc dot gnu.org
@ 2023-12-27 11:54 ` tnfchris at gcc dot gnu.org
  2023-12-27 11:55 ` tnfchris at gcc dot gnu.org
                   ` (11 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2023-12-27 11:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Loop seems to have been peeled and versioned, and has very convoluted sequence
of merge blocks for the exits.

I initially thought it would be enough to update the immediate reachable blocks
from the new exits.  But looks like I need to update any block of which they
are a parent of.

Patch work and now vectorizes the example.

Added to regression pile for today.

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-12-27 11:54 ` tnfchris at gcc dot gnu.org
@ 2023-12-27 11:55 ` tnfchris at gcc dot gnu.org
  2023-12-28 11:28 ` dcb314 at hotmail dot com
                   ` (10 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2023-12-27 11:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Created attachment 56954
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56954&action=edit
candidate-patch1.patch

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-12-27 11:55 ` tnfchris at gcc dot gnu.org
@ 2023-12-28 11:28 ` dcb314 at hotmail dot com
  2023-12-29 21:07 ` tnfchris at gcc dot gnu.org
                   ` (9 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: dcb314 at hotmail dot com @ 2023-12-28 11:28 UTC (permalink / raw)
  To: gcc-bugs

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

David Binderman <dcb314 at hotmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dcb314 at hotmail dot com

--- Comment #7 from David Binderman <dcb314 at hotmail dot com> ---
I see this one also, while building libmpg.

foundBugs $ ../results/bin/gcc -c -w -O3 bug993.c
foundBugs $ ../results/bin/gcc -c -w -O3 -march=znver3 bug993.c
src/libmpg123/format.c: In function ‘enc_chan_fit’:
src/libmpg123/format.c:188:12: error: dominator of 70 should be 206, not 3
src/libmpg123/format.c:188:12: error: dominator of 71 should be 206, not 3
during GIMPLE pass: vect
src/libmpg123/format.c:188:12: internal compiler error: in verify_dominators,
at dominance.cc:1194

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2023-12-28 11:28 ` dcb314 at hotmail dot com
@ 2023-12-29 21:07 ` tnfchris at gcc dot gnu.org
  2024-01-05 13:18 ` tnfchris at gcc dot gnu.org
                   ` (8 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2023-12-29 21:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Patch submitted

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2023-12-29 21:07 ` tnfchris at gcc dot gnu.org
@ 2024-01-05 13:18 ` tnfchris at gcc dot gnu.org
  2024-01-08 19:37 ` zsojka at seznam dot cz
                   ` (7 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-01-05 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
*** Bug 113145 has been marked as a duplicate of this bug. ***

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2024-01-05 13:18 ` tnfchris at gcc dot gnu.org
@ 2024-01-08 19:37 ` zsojka at seznam dot cz
  2024-01-08 19:55 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: zsojka at seznam dot cz @ 2024-01-08 19:37 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from Zdenek Sojka <zsojka at seznam dot cz> ---
Created attachment 57009
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57009&action=edit
simpler testcase using _BitInt()

$ x86_64-pc-linux-gnu-gcc -O3 -mavx2 testcase.c 
testcase.c: In function 'foo':
testcase.c:5:1: error: dominator of 24 should be 57, not 12
    5 | foo (void)
      | ^~~
testcase.c:5:1: error: dominator of 25 should be 57, not 12
during GIMPLE pass: vect
testcase.c:5:1: internal compiler error: in verify_dominators, at
dominance.cc:1194
0x742528 verify_dominators(cdi_direction)
...

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2024-01-08 19:37 ` zsojka at seznam dot cz
@ 2024-01-08 19:55 ` pinskia at gcc dot gnu.org
  2024-01-09  3:49 ` tnfchris at gcc dot gnu.org
                   ` (5 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-08 19:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Zdenek Sojka from comment #10)
> Created attachment 57009 [details]
> simpler testcase using _BitInt()
> 
> $ x86_64-pc-linux-gnu-gcc -O3 -mavx2 testcase.c 
> testcase.c: In function 'foo':
> testcase.c:5:1: error: dominator of 24 should be 57, not 12
>     5 | foo (void)
>       | ^~~
> testcase.c:5:1: error: dominator of 25 should be 57, not 12
> during GIMPLE pass: vect
> testcase.c:5:1: internal compiler error: in verify_dominators, at
> dominance.cc:1194
> 0x742528 verify_dominators(cdi_direction)
> ...

that might be a different issue ...

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2024-01-08 19:55 ` pinskia at gcc dot gnu.org
@ 2024-01-09  3:49 ` tnfchris at gcc dot gnu.org
  2024-01-09 17:14 ` jamborm at gcc dot gnu.org
                   ` (4 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-01-09  3:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #11)
> (In reply to Zdenek Sojka from comment #10)
> > Created attachment 57009 [details]
> > simpler testcase using _BitInt()
> > 
> > $ x86_64-pc-linux-gnu-gcc -O3 -mavx2 testcase.c 
> > testcase.c: In function 'foo':
> > testcase.c:5:1: error: dominator of 24 should be 57, not 12
> >     5 | foo (void)
> >       | ^~~
> > testcase.c:5:1: error: dominator of 25 should be 57, not 12
> > during GIMPLE pass: vect
> > testcase.c:5:1: internal compiler error: in verify_dominators, at
> > dominance.cc:1194
> > 0x742528 verify_dominators(cdi_direction)
> > ...
> 
> that might be a different issue ...

It's the same issue, but also fixed by the patch.
It's however not simpler :) this expands into a series of loops, and one of the
loops has 3 exits which is why it triggers.

The fixes that I am re-spinning fixes this and correctly vectorizes the loops.

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2024-01-09  3:49 ` tnfchris at gcc dot gnu.org
@ 2024-01-09 17:14 ` jamborm at gcc dot gnu.org
  2024-01-09 19:08 ` tnfchris at gcc dot gnu.org
                   ` (3 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: jamborm at gcc dot gnu.org @ 2024-01-09 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from Martin Jambor <jamborm at gcc dot gnu.org> ---
The testcase below segfaults when compiled with master configured with
release checking.  However, it is very likely affected by this bug (it
fails with checking compiler like testcases for this issue do) and so
I did not want to file a new bug for a testcase where we know we're
currently having problems keeping dominance information.

Tamar, after you fix this issue, can you please check if the following
segfaults when compiled with -std=gnu99 -fpermissive -fgnu89-inline
-Ofast -march=znver2 -fprofile-generate -S ?

Thanks!

replace_reg_with_saved_mem_i, replace_reg_with_saved_mem_nregs,
    replace_reg_with_saved_mem_mem_1;
replace_reg_with_saved_mem_mode() {
  if (replace_reg_with_saved_mem_i)
    return;
  while (++replace_reg_with_saved_mem_i < replace_reg_with_saved_mem_nregs)
    if (replace_reg_with_saved_mem_i)
      break;
  if (replace_reg_with_saved_mem_i)
    if (replace_reg_with_saved_mem_mem_1)
      adjust_address_1();
  replace_reg_with_saved_mem_mem_1 ? fancy_abort() : 0;
}

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2024-01-09 17:14 ` jamborm at gcc dot gnu.org
@ 2024-01-09 19:08 ` tnfchris at gcc dot gnu.org
  2024-01-09 22:21 ` tnfchris at gcc dot gnu.org
                   ` (2 subsequent siblings)
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-01-09 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #14 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Yeah I'll test. Richi approved the fix today and I'll commit after a final
regtest

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2024-01-09 19:08 ` tnfchris at gcc dot gnu.org
@ 2024-01-09 22:21 ` tnfchris at gcc dot gnu.org
  2024-01-10 12:54 ` cvs-commit at gcc dot gnu.org
  2024-01-10 12:56 ` tnfchris at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-01-09 22:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
(In reply to Martin Jambor from comment #13)
> The testcase below segfaults when compiled with master configured with
> release checking.  However, it is very likely affected by this bug (it
> fails with checking compiler like testcases for this issue do) and so
> I did not want to file a new bug for a testcase where we know we're
> currently having problems keeping dominance information.
> 
> Tamar, after you fix this issue, can you please check if the following
> segfaults when compiled with -std=gnu99 -fpermissive -fgnu89-inline
> -Ofast -march=znver2 -fprofile-generate -S ?
> 

yeah, with my current patches it works fine:

> ./install/bin/gcc segf.c -std=gnu99 -fpermissive -fgnu89-inline -Ofast -march=znver2 -fprofile-generate -S -w; and echo $status
0

I'll commit the bulk tomorrow. Thanks for the testcase!

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (14 preceding siblings ...)
  2024-01-09 22:21 ` tnfchris at gcc dot gnu.org
@ 2024-01-10 12:54 ` cvs-commit at gcc dot gnu.org
  2024-01-10 12:56 ` tnfchris at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-10 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #16 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:9e7c77c7933b1bb0dd07214333e52a9a896fa349

commit r14-7101-g9e7c77c7933b1bb0dd07214333e52a9a896fa349
Author: Tamar Christina <tamar.christina@arm.com>
Date:   Wed Jan 10 12:51:54 2024 +0000

    middle-end: Fix dominators updates when peeling with multiple exits
[PR113144]

    When we peel at_exit we are moving the new loop at the exit of the previous
    loop.  This means that the blocks outside the loop dat the previous loop
used to
    dominate are no longer being dominated by it.

    The new dominators however are hard to predict since if the loop has
multiple
    exits and all the exits are an "early" one then we always execute the
scalar
    loop.  In this case the scalar loop can completely dominate the new loop.

    If we later have skip_vector then there's an additional skip edge added
that
    might change the dominators.

    The previous patch would force an update of all blocks reachable from the
new
    exits.  This one updates *only* blocks that we know the scalar exits
dominated.

    For the examples this reduces the blocks to update from 18 to 3.

    gcc/ChangeLog:

            PR tree-optimization/113144
            PR tree-optimization/113145
            * tree-vect-loop-manip.cc (slpeel_tree_duplicate_loop_to_edge_cfg):
            Update all BB that the original exits dominated.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/113144
            PR tree-optimization/113145
            * gcc.dg/vect/vect-early-break_94-pr113144.c: New test.

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

* [Bug tree-optimization/113144] [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12)
  2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
                   ` (15 preceding siblings ...)
  2024-01-10 12:54 ` cvs-commit at gcc dot gnu.org
@ 2024-01-10 12:56 ` tnfchris at gcc dot gnu.org
  16 siblings, 0 replies; 18+ messages in thread
From: tnfchris at gcc dot gnu.org @ 2024-01-10 12:56 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #17 from Tamar Christina <tnfchris at gcc dot gnu.org> ---
Fixed, thanks for the reports!

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

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

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-26  6:55 [Bug tree-optimization/113144] New: [14 regression] ICE when building dpkg-1.21.15 in verify_dominators (error: dominator of 9 should be 48, not 12) sjames at gcc dot gnu.org
2023-12-26  6:55 ` [Bug tree-optimization/113144] " sjames at gcc dot gnu.org
2023-12-26  7:01 ` sjames at gcc dot gnu.org
2023-12-26 14:14 ` tnfchris at gcc dot gnu.org
2023-12-26 14:28 ` tnfchris at gcc dot gnu.org
2023-12-27 11:54 ` tnfchris at gcc dot gnu.org
2023-12-27 11:55 ` tnfchris at gcc dot gnu.org
2023-12-28 11:28 ` dcb314 at hotmail dot com
2023-12-29 21:07 ` tnfchris at gcc dot gnu.org
2024-01-05 13:18 ` tnfchris at gcc dot gnu.org
2024-01-08 19:37 ` zsojka at seznam dot cz
2024-01-08 19:55 ` pinskia at gcc dot gnu.org
2024-01-09  3:49 ` tnfchris at gcc dot gnu.org
2024-01-09 17:14 ` jamborm at gcc dot gnu.org
2024-01-09 19:08 ` tnfchris at gcc dot gnu.org
2024-01-09 22:21 ` tnfchris at gcc dot gnu.org
2024-01-10 12:54 ` cvs-commit at gcc dot gnu.org
2024-01-10 12:56 ` tnfchris 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).