public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
@ 2022-07-10  9:51 iains at gcc dot gnu.org
  2022-07-10  9:54 ` [Bug tree-optimization/106246] " iains at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: iains at gcc dot gnu.org @ 2022-07-10  9:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106246
           Summary: [13 Regression] powerpc-darwin9 bootstrap fails after
                    r13-1575-gcf3a120084e946 ICE vect_transform_loops, at
                    tree-vectorizer.cc:1032
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

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

reproduces on a cross from x86_64-linux-gnu like so:
$ ./gcc/cc1plus -quiet -O2 -fpreprocessed ../ggc-page.ii 
during GIMPLE pass: vect
../ggc-page.ii: In function ‘void ggc_pch_total_size()’:
../ggc-page.ii:8:6: internal compiler error: in vect_transform_loops, at
tree-vectorizer.cc:1032
    8 | void ggc_pch_total_size() {
      |      ^~~~~~~~~~~~~~~~~~
0x1ba4c31 vect_transform_loops
        ../../src/gcc/tree-vectorizer.cc:1032
0x1ba5250 try_vectorize_loop_1
        ../../src/gcc/tree-vectorizer.cc:1153
0x1ba5389 try_vectorize_loop
        ../../src/gcc/tree-vectorizer.cc:1183
0x1ba561d execute
        ../../src/gcc/tree-vectorizer.cc:1299

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
@ 2022-07-10  9:54 ` iains at gcc dot gnu.org
  2022-07-11  6:40 ` rguenth at gcc dot gnu.org
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: iains at gcc dot gnu.org @ 2022-07-10  9:54 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |build, ice-on-valid-code
   Last reconfirmed|                            |2022-07-10
             Target|                            |powerpc-darwin9
   Target Milestone|---                         |13.0
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
      Known to fail|                            |13.0

--- Comment #1 from Iain Sandoe <iains at gcc dot gnu.org> ---
note, that powerpc64-linux-gnu (BE power7) seems to be OK (although that's
still a 64b host)

(confirmed with a native build and crosses on x86-64 darwin and linux).

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
  2022-07-10  9:54 ` [Bug tree-optimization/106246] " iains at gcc dot gnu.org
@ 2022-07-11  6:40 ` rguenth at gcc dot gnu.org
  2022-07-11  6:49 ` iains at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-11  6:40 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Maybe a duplicate of PR106228.  I can't reproduce with the fix for that in the
tree.  Is there anything besides --target=powerpc-darwin9 to use?  Any -mcpu=?

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
  2022-07-10  9:54 ` [Bug tree-optimization/106246] " iains at gcc dot gnu.org
  2022-07-11  6:40 ` rguenth at gcc dot gnu.org
@ 2022-07-11  6:49 ` iains at gcc dot gnu.org
  2022-07-11  7:33 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: iains at gcc dot gnu.org @ 2022-07-11  6:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> Maybe a duplicate of PR106228.  I can't reproduce with the fix for that in
> the tree.  Is there anything besides --target=powerpc-darwin9 to use?  Any
> -mcpu=?

there's a build (with debug) on gcc186
(/home/iains/gcc-master/bld-x-ppc-darwin9) if that's any use.

I bootstrapped master and then :

$ ./gcc/xgcc -v
Using built-in specs.
COLLECT_GCC=./gcc/xgcc
Target: powerpc-apple-darwin9
Configured with: ../src/configure --prefix=/home/iains/gcc-master/gcc-13-0-0
--target=powerpc-apple-darwin9 --build=x86_64-pc-linux-gnu
--enable-languages=c,c++

it could be a dup, indeed (I also see the libgfortran fails on the previous
rev, and the new vector test case fails).

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-07-11  6:49 ` iains at gcc dot gnu.org
@ 2022-07-11  7:33 ` rguenth at gcc dot gnu.org
  2022-07-11  9:06 ` iains at gcc dot gnu.org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-11  7:33 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
I've now pushed the fix for PR106228, so maybe you can re-try.

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-07-11  7:33 ` rguenth at gcc dot gnu.org
@ 2022-07-11  9:06 ` iains at gcc dot gnu.org
  2022-07-11  9:07 ` iains at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: iains at gcc dot gnu.org @ 2022-07-11  9:06 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW

--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
actually fails sooner - Ada and libstdc++ stage1 fail to build (constraint/bus
errors).

this is from a cross (which I realise you will not be able to replicate,
without the sysroot etc.)  If the reason is non-obvious, I'll try a reduction
later..

/scratch/10-15-cat/gcc-master-x-powerpc/./gcc/cc1plus -fpreprocessed
cxx11-locale-inst.ii -feliminate-unused-debug-symbols -fPIC -quiet -dumpbase
cxx11-locale-inst.cc -dumpbase-ext .cc -mmacosx-version-min=10.5 -g -O2 -Wall
-Wextra -Wwrite-strings -Wcast-qual -Wabi=2 -std=gnu++11 -version
-fno-implicit-templates -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=cxx11-locale-inst.lo -fno-common -o
cxx11-locale-inst.s

* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS
(code=1, address=0x8)
    frame #0: 0x0000000101ca6d94
cc1plus`vect_setup_realignment(vinfo=0x0000000106fb50e0,
stmt_info=0x0000000106fb3aa0, gsi=0x00007ffeefbfe720,
realignment_token=0x00007ffeefbfdc70,
alignment_support_scheme=dr_explicit_realign, init_addr=0x000000010aa73e58,
at_loop=0x00007ffeefbfdc60) at tree-vect-data-refs.cc:5784:32
   5781     pe = loop_preheader_edge (loop_for_initial_load);
   5782 
   5783   tree vuse;
-> 5784   gphi *vphi = get_virtual_phi (loop_for_initial_load->header);
   5785   if (vphi)
   5786     vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe);
   5787   else


  * frame #0: 0x0000000101ca6d94
cc1plus`vect_setup_realignment(vinfo=0x0000000106fb50e0,
stmt_info=0x0000000106fb3aa0, gsi=0x00007ffeefbfe720,
realignment_token=0x00007ffeefbfdc70,
alignment_support_scheme=dr_explicit_realign, init_addr=0x000000010aa73e58,
at_loop=0x00007ffeefbfdc60) at tree-vect-data-refs.cc:5784:32
    frame #1: 0x0000000101cd5882
cc1plus`::vectorizable_load(vinfo=0x0000000106fb50e0,
stmt_info=0x0000000106fb3aa0, gsi=0x00007ffeefbfe720,
vec_stmt=0x00007ffeefbfe648, slp_node=0x0000000109488098,
cost_vec=0x0000000000000000) at tree-vect-stmts.cc:9608:34
    frame #2: 0x0000000101cdbe66
cc1plus`vect_transform_stmt(vinfo=0x0000000106fb50e0,
stmt_info=0x0000000106fb3aa0, gsi=0x00007ffeefbfe720,
slp_node=0x0000000109488098, slp_node_instance=0x0000000106830140) at
tree-vect-stmts.cc:11332:32
    frame #3: 0x0000000101d40be4
cc1plus`::vect_schedule_slp_node(vinfo=0x0000000106fb50e0,
node=0x0000000109488098, instance=0x0000000106830140) at
tree-vect-slp.cc:7438:25
    frame #4: 0x0000000101d41725
cc1plus`::vect_schedule_scc(vinfo=0x0000000106fb50e0, node=0x0000000109488098,
instance=0x0000000106830140, scc_info=0x00007ffeefbfea40,
maxdfs=0x00007ffeefbfea3c, stack=0x00007ffeefbfea28) at
tree-vect-slp.cc:7633:30
    frame #5: 0x0000000101d415e3
cc1plus`::vect_schedule_scc(vinfo=0x0000000106fb50e0, node=0x0000000109488010,
instance=0x0000000106830140, scc_info=0x00007ffeefbfea40,
maxdfs=0x00007ffeefbfea3c, stack=0x00007ffeefbfea28) at
tree-vect-slp.cc:7614:22
    frame #6: 0x0000000101d41e03
cc1plus`vect_schedule_slp(vinfo=0x0000000106fb50e0,
slp_instances=0x0000000106830170) at tree-vect-slp.cc:7750:20
    frame #7: 0x0000000101d3b97c
cc1plus`::vect_slp_region(bbs=vec<basic_block_def*, va_heap, vl_ptr> @
0x00007ffeefbfebe8, datarefs=vec<data_reference*, va_heap, vl_ptr> @
0x00007ffeefbfebe0, dataref_groups=0x00007ffeefbff050, n_stmts=98,
orig_loop=0x0000000000000000) at tree-vect-slp.cc:6056:26
    frame #8: 0x0000000101d3c26a cc1plus`::vect_slp_bbs(bbs=0x00007ffeefbff0d8,
orig_loop=0x0000000000000000) at tree-vect-slp.cc:6168:26
    frame #9: 0x0000000101d3c752
cc1plus`vect_slp_function(fun=0x000000010aa8a678) at tree-vect-slp.cc:6256:23
    frame #10: 0x0000000101d5c847
cc1plus`pass_slp_vectorize::execute(this=0x0000000106b113e0,
fun=0x000000010aa8a678) const at tree-vectorizer.cc:1532:21
    frame #11: 0x00000001016e3116
cc1plus`execute_one_pass(pass=0x0000000106b113e0) at passes.cc:2644:30
    frame #12: 0x00000001016e34fd
cc1plus`::execute_pass_list_1(pass=0x0000000106b113e0) at passes.cc:2744:28
    frame #13: 0x00000001016e352e
cc1plus`::execute_pass_list_1(pass=0x0000000106b11380) at passes.cc:2745:22
    frame #14: 0x00000001016e352e
cc1plus`::execute_pass_list_1(pass=0x0000000106b0f250) at passes.cc:2745:22
    frame #15: 0x00000001016e3594
cc1plus`execute_pass_list(fn=0x000000010aa8a678, pass=0x0000000106b0ef50) at
passes.cc:2755:23
    frame #16: 0x0000000100efdf96
cc1plus`cgraph_node::expand(this=0x000000010a752110) at cgraphunit.cc:1834:21
    frame #17: 0x0000000100efe76f cc1plus`::expand_all_functions() at
cgraphunit.cc:1998:17
    frame #18: 0x0000000100eff4b4
cc1plus`symbol_table::compile(this=0x0000000106c06000) at cgraphunit.cc:2348:24
    frame #19: 0x0000000100eff921
cc1plus`symbol_table::finalize_compilation_unit(this=0x0000000106c06000) at
cgraphunit.cc:2529:11
    frame #20: 0x00000001018af3ef cc1plus`::compile_file() at toplev.cc:479:41

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2022-07-11  9:06 ` iains at gcc dot gnu.org
@ 2022-07-11  9:07 ` iains at gcc dot gnu.org
  2022-07-11  9:47 ` rguenth at gcc dot gnu.org
  2022-07-12 22:22 ` iains at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: iains at gcc dot gnu.org @ 2022-07-11  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Iain Sandoe <iains at gcc dot gnu.org> ---
as noted on IRC, of course this could be unrelated, since other changes have
been committed in the meantime.

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2022-07-11  9:07 ` iains at gcc dot gnu.org
@ 2022-07-11  9:47 ` rguenth at gcc dot gnu.org
  2022-07-12 22:22 ` iains at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-07-11  9:47 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> ---
OK, indeed this is caused by my most recent change.  The following should fix
this, I'm going to test this on x86_64-linux (no convenient ppc testing machine
available for me right now)

diff --git a/gcc/tree-vect-data-refs.cc b/gcc/tree-vect-data-refs.cc
index 53e52cb58cb..609cacc4971 100644
--- a/gcc/tree-vect-data-refs.cc
+++ b/gcc/tree-vect-data-refs.cc
@@ -5777,14 +5777,14 @@ vect_setup_realignment (vec_info *vinfo, stmt_vec_info
stmt_info,
   if (at_loop)
     *at_loop = loop_for_initial_load;

+  tree vuse = NULL_TREE;
   if (loop_for_initial_load)
-    pe = loop_preheader_edge (loop_for_initial_load);
-
-  tree vuse;
-  gphi *vphi = get_virtual_phi (loop_for_initial_load->header);
-  if (vphi)
-    vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe);
-  else
+    {
+      pe = loop_preheader_edge (loop_for_initial_load);
+      if (gphi *vphi = get_virtual_phi (loop_for_initial_load->header))
+       vuse = PHI_ARG_DEF_FROM_EDGE (vphi, pe);
+    }
+  if (!vuse)
     vuse = gimple_vuse (gsi_stmt (*gsi));

   /* 3. For the case of the optimized realignment, create the first vector

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

* [Bug tree-optimization/106246] [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032
  2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2022-07-11  9:47 ` rguenth at gcc dot gnu.org
@ 2022-07-12 22:22 ` iains at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: iains at gcc dot gnu.org @ 2022-07-12 22:22 UTC (permalink / raw)
  To: gcc-bugs

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

Iain Sandoe <iains at gcc dot gnu.org> changed:

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

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> ---
indeed, fixed by r13-1603-g415d2c38edad
thanks.

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

end of thread, other threads:[~2022-07-12 22:22 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-10  9:51 [Bug tree-optimization/106246] New: [13 Regression] powerpc-darwin9 bootstrap fails after r13-1575-gcf3a120084e946 ICE vect_transform_loops, at tree-vectorizer.cc:1032 iains at gcc dot gnu.org
2022-07-10  9:54 ` [Bug tree-optimization/106246] " iains at gcc dot gnu.org
2022-07-11  6:40 ` rguenth at gcc dot gnu.org
2022-07-11  6:49 ` iains at gcc dot gnu.org
2022-07-11  7:33 ` rguenth at gcc dot gnu.org
2022-07-11  9:06 ` iains at gcc dot gnu.org
2022-07-11  9:07 ` iains at gcc dot gnu.org
2022-07-11  9:47 ` rguenth at gcc dot gnu.org
2022-07-12 22:22 ` iains 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).