[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-12 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

Iain Sandoe  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #8 from Iain Sandoe  ---
indeed, fixed by r13-1603-g415d2c38edad
thanks.

[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-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

--- Comment #7 from Richard Biener  ---
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

[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-11 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

--- Comment #6 from Iain Sandoe  ---
as noted on IRC, of course this could be unrelated, since other changes have
been committed in the meantime.

[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-11 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

Iain Sandoe  changed:

   What|Removed |Added

 Status|WAITING |NEW

--- Comment #5 from Iain Sandoe  ---
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: 0x000101ca6d94
cc1plus`vect_setup_realignment(vinfo=0x000106fb50e0,
stmt_info=0x000106fb3aa0, gsi=0x7ffeefbfe720,
realignment_token=0x7ffeefbfdc70,
alignment_support_scheme=dr_explicit_realign, init_addr=0x00010aa73e58,
at_loop=0x7ffeefbfdc60) 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: 0x000101ca6d94
cc1plus`vect_setup_realignment(vinfo=0x000106fb50e0,
stmt_info=0x000106fb3aa0, gsi=0x7ffeefbfe720,
realignment_token=0x7ffeefbfdc70,
alignment_support_scheme=dr_explicit_realign, init_addr=0x00010aa73e58,
at_loop=0x7ffeefbfdc60) at tree-vect-data-refs.cc:5784:32
frame #1: 0x000101cd5882
cc1plus`::vectorizable_load(vinfo=0x000106fb50e0,
stmt_info=0x000106fb3aa0, gsi=0x7ffeefbfe720,
vec_stmt=0x7ffeefbfe648, slp_node=0x000109488098,
cost_vec=0x) at tree-vect-stmts.cc:9608:34
frame #2: 0x000101cdbe66
cc1plus`vect_transform_stmt(vinfo=0x000106fb50e0,
stmt_info=0x000106fb3aa0, gsi=0x7ffeefbfe720,
slp_node=0x000109488098, slp_node_instance=0x000106830140) at
tree-vect-stmts.cc:11332:32
frame #3: 0x000101d40be4
cc1plus`::vect_schedule_slp_node(vinfo=0x000106fb50e0,
node=0x000109488098, instance=0x000106830140) at
tree-vect-slp.cc:7438:25
frame #4: 0x000101d41725
cc1plus`::vect_schedule_scc(vinfo=0x000106fb50e0, node=0x000109488098,
instance=0x000106830140, scc_info=0x7ffeefbfea40,
maxdfs=0x7ffeefbfea3c, stack=0x7ffeefbfea28) at
tree-vect-slp.cc:7633:30
frame #5: 0x000101d415e3
cc1plus`::vect_schedule_scc(vinfo=0x000106fb50e0, node=0x000109488010,
instance=0x000106830140, scc_info=0x7ffeefbfea40,
maxdfs=0x7ffeefbfea3c, stack=0x7ffeefbfea28) at
tree-vect-slp.cc:7614:22
frame #6: 0x000101d41e03
cc1plus`vect_schedule_slp(vinfo=0x000106fb50e0,
slp_instances=0x000106830170) at tree-vect-slp.cc:7750:20
frame #7: 0x000101d3b97c
cc1plus`::vect_slp_region(bbs=vec @
0x7ffeefbfebe8, datarefs=vec @
0x7ffeefbfebe0, dataref_groups=0x7ffeefbff050, n_stmts=98,
orig_loop=0x) at tree-vect-slp.cc:6056:26
frame #8: 0x000101d3c26a cc1plus`::vect_slp_bbs(bbs=0x7ffeefbff0d8,
orig_loop=0x) at tree-vect-slp.cc:6168:26
frame #9: 0x000101d3c752
cc1plus`vect_slp_function(fun=0x00010aa8a678) at tree-vect-slp.cc:6256:23
frame #10: 0x000101d5c847
cc1plus`pass_slp_vectorize::execute(this=0x000106b113e0,
fun=0x00010aa8a678) const at tree-vectorizer.cc:1532:21
frame #11: 0x0001016e3116
cc1plus`execute_one_pass(pass=0x000106b113e0) at passes.cc:2644:30
frame #12: 0x0001016e34fd
cc1plus`::execute_pass_list_1(pass=0x000106b113e0) at passes.cc:2744:28
frame #13: 0x0001016e352e
cc1plus`::execute_pass_list_1(pass=0x000106b11380) at passes.cc:2745:22
frame #14: 0x0001016e352e
cc1plus`::execute_pass_list_1(pass=0x000106b0f250) at passes.cc:2745:22
frame #15: 0x0001016e3594
cc1plus`execute_pass_list(fn=0x00010aa8a678, pass=0x000106b0ef50) at
passes.cc:2755:23
frame #16: 0x000100efdf96
cc1plus`cgraph_node::expand(this=0x00010a752110) at cgraphunit.cc:1834:21
frame #17: 0x000100efe76f cc1plus`::expand_all_functions() at
cgraphunit.cc:1998:17
frame #18: 0x000100eff4b4
cc1plus`symbol_table::compile(this=0x000106c06000) at cgraphunit.cc:2348:24
frame #19: 0x000100eff921
cc1plus`symbol_table::finalize_compilation_unit(this=0x000106c06000) at
cgraphunit.cc:2529:11
frame #20: 0x0001018af3ef 

[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-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

--- Comment #4 from Richard Biener  ---
I've now pushed the fix for PR106228, so maybe you can re-try.

[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-11 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

--- Comment #3 from Iain Sandoe  ---
(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).

[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-11 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |WAITING
 CC||rguenth at gcc dot gnu.org

--- Comment #2 from Richard Biener  ---
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=?

[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 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106246

Iain Sandoe  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  ---
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).