public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/110776] New: [14 Regression] powerpc-darwin bootstrap broken after r14-2490 with ICE rs6000.cc:5069 building libgfortran
@ 2023-07-22 15:45 iains at gcc dot gnu.org
  2023-07-22 15:48 ` [Bug target/110776] " iains at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: iains at gcc dot gnu.org @ 2023-07-22 15:45 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110776
           Summary: [14 Regression] powerpc-darwin bootstrap broken after
                    r14-2490 with ICE rs6000.cc:5069 building libgfortran
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
  Target Milestone: ---

The ICE seems to be because rs6000_builtin_vectorization_cost () is called with
a request for a misaligned load (which we do not support), It reproduces on a
cross from x86_64.

This is in compiling libgfortran generated code (so nothing Darwin-specific,
other than being an Altivec platform).

A philosophical question; if a request is made for the cost of doing something
unsupported - should we not return "infinity" rather than ICEing?  

Presumably, the alternative is that the middle end needs to know that some
kinds of operation are not supported and therefore not to try and cost them
(speculation here; I have no knowledge of the relevant code).

=====

..../gcc/cc1 -fpreprocessed .libs/reshape_i4.i -feliminate-unused-debug-symbols
-fPIC -quiet -dumpdir .libs/ -dumpbase reshape_i4.c -dumpbase-ext .c -m64
-mmacosx-version-min=10.5 -g -O2 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings
-Werror=implicit-function-declaration -Werror=vla -Wunknown-pragmas -std=gnu11
-std=gnu11 -version -fcx-fortran-rules -ffunction-sections -fdata-sections
-fno-common -o .libs/reshape_i4.s

backtrace:
  * frame #0: 0x0000000101d840cd cc1`internal_error(gmsgid="in %s, at %s:%d")
at diagnostic.cc:2166:25
    frame #1: 0x0000000101d845b3
cc1`fancy_abort(file="/src-local/gcc-master/gcc/config/rs6000/rs6000.cc",
line=5069, function="rs6000_builtin_vectorization_cost") at
diagnostic.cc:2296:18
    frame #2: 0x0000000101accf54
cc1`::rs6000_builtin_vectorization_cost(type_of_cost=unaligned_load,
vectype=0x0000000115045a80, misalign=-1) at rs6000.cc:5069:4
    frame #3: 0x00000001019bb55c
cc1`builtin_vectorization_cost(type_of_cost=unaligned_load,
vectype=0x0000000115045a80, misalign=-1) at tree-vectorizer.h:1789:55
    frame #4: 0x0000000101903b4f
cc1`::record_stmt_cost(body_cost_vec=0x0000000308b11a00, count=1,
kind=unaligned_load, stmt_info=0x0000000111a0e210, node=0x0000000000000000,
vectype=0x0000000115045a80, misalign=-1, where=vect_body) at
tree-vect-stmts.cc:113:35
    frame #5: 0x0000000101903b9e
cc1`record_stmt_cost(body_cost_vec=0x0000000308b11a00, count=1,
kind=unaligned_load, stmt_info=0x0000000111a0e210, vectype=0x0000000115045a80,
misalign=-1, where=vect_body) at tree-vect-stmts.cc:122:27
    frame #6: 0x000000010197ea64
cc1`record_stmt_cost(body_cost_vec=0x0000000308b11a00, count=1,
kind=unaligned_load, stmt_info=0x0000000111a0e210, misalign=-1,
where=vect_body) at tree-vectorizer.h:2210:27
    frame #7: 0x00000001019073f6
cc1`vect_get_load_cost((null)=0x0000000111a0d110, stmt_info=0x0000000111a0e210,
ncopies=1, alignment_support_scheme=dr_unaligned_supported, misalignment=-1,
add_realign_cost=false, inside_cost=0x0000000308b10ac4,
prologue_cost=0x0000000000000000, prologue_cost_vec=0x0000000308b11a00,
body_cost_vec=0x0000000308b11a00, record_prologue_costs=true) at
tree-vect-stmts.cc:1307:35
    frame #8: 0x000000010192b199
cc1`::vectorizable_load(vinfo=0x0000000111a0d110, stmt_info=0x0000000111a0e210,
gsi=0x0000000000000000, vec_stmt=0x0000000000000000,
slp_node=0x0000000000000000, cost_vec=0x0000000308b11a00) at
tree-vect-stmts.cc:9989:26
    frame #9: 0x00000001019329be
cc1`vect_analyze_stmt(vinfo=0x0000000111a0d110, stmt_info=0x0000000111a0e210,
need_to_vectorize=0x0000000308b11a0f, node=0x0000000000000000,
node_instance=0x0000000000000000, cost_vec=0x0000000308b11a00) at
tree-vect-stmts.cc:12124:25
    frame #10: 0x000000010194622e
cc1`::vect_analyze_loop_operations(loop_vinfo=0x0000000111a0d110) at
tree-vect-loop.cc:2083:23
    frame #11: 0x0000000101948c6e
cc1`::vect_analyze_loop_2(loop_vinfo=0x0000000111a0d110,
fatal=0x0000000308b1292f, suggested_unroll_factor=0x0000000308b1276c,
slp_done_for_suggested_uf=0x0000000308b1276b) at tree-vect-loop.cc:2880:37
    frame #12: 0x000000010194a49b
cc1`::vect_analyze_loop_1(loop=0x0000000115007200, shared=0x0000000308b12ce0,
loop_form_info=0x0000000308b129f0, main_loop_vinfo=0x0000000000000000,
vector_modes=0x0000000308b129b0, mode_i=0x0000000308b1299c,
autodetected_vector_mode=0x0000000308b129ac, fatal=0x0000000308b1292f) at
tree-vect-loop.cc:3316:40
    frame #13: 0x000000010194b036
cc1`vect_analyze_loop(loop=0x0000000115007200, shared=0x0000000308b12ce0) at
tree-vect-loop.cc:3470:24
    frame #14: 0x00000001019be5c5
cc1`::try_vectorize_loop_1(simduid_to_vf_htab=0x0000000308b12f30,
num_vectorized_loops=0x0000000308b12f3c, loop=0x0000000115007200,
loop_vectorized_call=0x00000001150e61b0,
loop_dist_alias_call=0x0000000000000000, fun=0x000000011500d000) at
tree-vectorizer.cc:1064:52
    frame #15: 0x00000001019beb2c
cc1`::try_vectorize_loop(simduid_to_vf_htab=0x0000000308b12f30,
num_vectorized_loops=0x0000000308b12f3c, loop=0x0000000115007200,
fun=0x000000011500d000) at tree-vectorizer.cc:1180:31
    frame #16: 0x00000001019bedd0
cc1`pass_vectorize::execute(this=0x0000600002604300, fun=0x000000011500d000)
const at tree-vectorizer.cc:1296:33
    frame #17: 0x0000000101382584 cc1`execute_one_pass(pass=0x0000600002604300)
at passes.cc:2651:30
    frame #18: 0x00000001013829c3
cc1`::execute_pass_list_1(pass=0x0000600002604300) at passes.cc:2760:28
    frame #19: 0x00000001013829f4
cc1`::execute_pass_list_1(pass=0x000060000260f480) at passes.cc:2761:22
    frame #20: 0x00000001013829f4
cc1`::execute_pass_list_1(pass=0x000060000260e1c0) at passes.cc:2761:22
    frame #21: 0x0000000101382a5a cc1`execute_pass_list(fn=0x000000011500d000,
pass=0x000060000260dec0) at passes.cc:2771:23
    frame #22: 0x0000000100bb0866
cc1`cgraph_node::expand(this=0x0000000113d06220) at cgraphunit.cc:1841:21
    frame #23: 0x0000000100bb1107 cc1`::expand_all_functions() at
cgraphunit.cc:2024:21
    frame #24: 0x0000000100bb1fb2
cc1`symbol_table::compile(this=0x0000000113806000) at cgraphunit.cc:2398:24
    frame #25: 0x0000000100bb24b4
cc1`symbol_table::finalize_compilation_unit(this=0x0000000113806000) at
cgraphunit.cc:2583:11
    frame #26: 0x0000000101552e17 cc1`::compile_file() at toplev.cc:471:41
    frame #27: 0x0000000101556832 cc1`::do_compile(no_backend=false) at
toplev.cc:2126:24
    frame #28: 0x0000000101556d76 cc1`toplev::main(this=0x0000000308b1333a,
argc=34, argv=0x0000000308b13490) at toplev.cc:2282:18
    frame #29: 0x0000000101d53d18 cc1`main(argc=34, argv=0x0000000308b13490) at
main.cc:39:23

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

end of thread, other threads:[~2023-07-27  2:45 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-22 15:45 [Bug target/110776] New: [14 Regression] powerpc-darwin bootstrap broken after r14-2490 with ICE rs6000.cc:5069 building libgfortran iains at gcc dot gnu.org
2023-07-22 15:48 ` [Bug target/110776] " iains at gcc dot gnu.org
2023-07-22 16:07 ` pinskia at gcc dot gnu.org
2023-07-24  1:49 ` linkw at gcc dot gnu.org
2023-07-25  2:52 ` linkw at gcc dot gnu.org
2023-07-25  2:54 ` linkw at gcc dot gnu.org
2023-07-25  6:34 ` rguenther at suse dot de
2023-07-25  6:53 ` linkw at gcc dot gnu.org
2023-07-25 11:05 ` rguenther at suse dot de
2023-07-25 19:44 ` iains at gcc dot gnu.org
2023-07-26  2:54 ` linkw at gcc dot gnu.org
2023-07-27  2:43 ` cvs-commit at gcc dot gnu.org
2023-07-27  2:45 ` linkw 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).