From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 1B0DA3858D1E; Sat, 22 Jul 2023 15:45:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1B0DA3858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1690040702; bh=sYTxTNMQEuGXNrQWSoH+OJFWoBXM0fF6F+o/8g4VvZg=; h=From:To:Subject:Date:From; b=gSxWrenTPhAmW0L5zQikadY4vwISkSn8JuqNFcsNGvrI1Sgmaut38Npqb9+GzxUaF qodPopkTKMX+moDhtoJUJUolRrI4OIjcHuI99eVvCDYwTavYxan2bF6BFwPKkhXovt OsCttpluN49+42i/E5okHhreioet8t7cnAa+iR74= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/110776] New: [14 Regression] powerpc-darwin bootstrap broken after r14-2490 with ICE rs6000.cc:5069 building libgfortran Date: Sat, 22 Jul 2023 15:45:01 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D110776 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 someth= ing unsupported - should we not return "infinity" rather than ICEing?=20=20 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). =3D=3D=3D=3D=3D ..../gcc/cc1 -fpreprocessed .libs/reshape_i4.i -feliminate-unused-debug-sym= bols -fPIC -quiet -dumpdir .libs/ -dumpbase reshape_i4.c -dumpbase-ext .c -m64 -mmacosx-version-min=3D10.5 -g -O2 -Wall -Wstrict-prototypes -Wmissing-prot= otypes -Wold-style-definition -Wextra -Wwrite-strings -Werror=3Dimplicit-function-declaration -Werror=3Dvla -Wunknown-pragmas -st= d=3Dgnu11 -std=3Dgnu11 -version -fcx-fortran-rules -ffunction-sections -fdata-sections -fno-common -o .libs/reshape_i4.s backtrace: * frame #0: 0x0000000101d840cd cc1`internal_error(gmsgid=3D"in %s, at %s:= %d") at diagnostic.cc:2166:25 frame #1: 0x0000000101d845b3 cc1`fancy_abort(file=3D"/src-local/gcc-master/gcc/config/rs6000/rs6000.cc", line=3D5069, function=3D"rs6000_builtin_vectorization_cost") at diagnostic.cc:2296:18 frame #2: 0x0000000101accf54 cc1`::rs6000_builtin_vectorization_cost(type_of_cost=3Dunaligned_load, vectype=3D0x0000000115045a80, misalign=3D-1) at rs6000.cc:5069:4 frame #3: 0x00000001019bb55c cc1`builtin_vectorization_cost(type_of_cost=3Dunaligned_load, vectype=3D0x0000000115045a80, misalign=3D-1) at tree-vectorizer.h:1789:55 frame #4: 0x0000000101903b4f cc1`::record_stmt_cost(body_cost_vec=3D0x0000000308b11a00, count=3D1, kind=3Dunaligned_load, stmt_info=3D0x0000000111a0e210, node=3D0x00000000000= 00000, vectype=3D0x0000000115045a80, misalign=3D-1, where=3Dvect_body) at tree-vect-stmts.cc:113:35 frame #5: 0x0000000101903b9e cc1`record_stmt_cost(body_cost_vec=3D0x0000000308b11a00, count=3D1, kind=3Dunaligned_load, stmt_info=3D0x0000000111a0e210, vectype=3D0x00000001= 15045a80, misalign=3D-1, where=3Dvect_body) at tree-vect-stmts.cc:122:27 frame #6: 0x000000010197ea64 cc1`record_stmt_cost(body_cost_vec=3D0x0000000308b11a00, count=3D1, kind=3Dunaligned_load, stmt_info=3D0x0000000111a0e210, misalign=3D-1, where=3Dvect_body) at tree-vectorizer.h:2210:27 frame #7: 0x00000001019073f6 cc1`vect_get_load_cost((null)=3D0x0000000111a0d110, stmt_info=3D0x000000011= 1a0e210, ncopies=3D1, alignment_support_scheme=3Ddr_unaligned_supported, misalignmen= t=3D-1, add_realign_cost=3Dfalse, inside_cost=3D0x0000000308b10ac4, prologue_cost=3D0x0000000000000000, prologue_cost_vec=3D0x0000000308b11a00, body_cost_vec=3D0x0000000308b11a00, record_prologue_costs=3Dtrue) at tree-vect-stmts.cc:1307:35 frame #8: 0x000000010192b199 cc1`::vectorizable_load(vinfo=3D0x0000000111a0d110, stmt_info=3D0x000000011= 1a0e210, gsi=3D0x0000000000000000, vec_stmt=3D0x0000000000000000, slp_node=3D0x0000000000000000, cost_vec=3D0x0000000308b11a00) at tree-vect-stmts.cc:9989:26 frame #9: 0x00000001019329be cc1`vect_analyze_stmt(vinfo=3D0x0000000111a0d110, stmt_info=3D0x0000000111a= 0e210, need_to_vectorize=3D0x0000000308b11a0f, node=3D0x0000000000000000, node_instance=3D0x0000000000000000, cost_vec=3D0x0000000308b11a00) at tree-vect-stmts.cc:12124:25 frame #10: 0x000000010194622e cc1`::vect_analyze_loop_operations(loop_vinfo=3D0x0000000111a0d110) at tree-vect-loop.cc:2083:23 frame #11: 0x0000000101948c6e cc1`::vect_analyze_loop_2(loop_vinfo=3D0x0000000111a0d110, fatal=3D0x0000000308b1292f, suggested_unroll_factor=3D0x0000000308b1276c, slp_done_for_suggested_uf=3D0x0000000308b1276b) at tree-vect-loop.cc:2880:37 frame #12: 0x000000010194a49b cc1`::vect_analyze_loop_1(loop=3D0x0000000115007200, shared=3D0x0000000308b= 12ce0, loop_form_info=3D0x0000000308b129f0, main_loop_vinfo=3D0x0000000000000000, vector_modes=3D0x0000000308b129b0, mode_i=3D0x0000000308b1299c, autodetected_vector_mode=3D0x0000000308b129ac, fatal=3D0x0000000308b1292f) = at tree-vect-loop.cc:3316:40 frame #13: 0x000000010194b036 cc1`vect_analyze_loop(loop=3D0x0000000115007200, shared=3D0x0000000308b12ce= 0) at tree-vect-loop.cc:3470:24 frame #14: 0x00000001019be5c5 cc1`::try_vectorize_loop_1(simduid_to_vf_htab=3D0x0000000308b12f30, num_vectorized_loops=3D0x0000000308b12f3c, loop=3D0x0000000115007200, loop_vectorized_call=3D0x00000001150e61b0, loop_dist_alias_call=3D0x0000000000000000, fun=3D0x000000011500d000) at tree-vectorizer.cc:1064:52 frame #15: 0x00000001019beb2c cc1`::try_vectorize_loop(simduid_to_vf_htab=3D0x0000000308b12f30, num_vectorized_loops=3D0x0000000308b12f3c, loop=3D0x0000000115007200, fun=3D0x000000011500d000) at tree-vectorizer.cc:1180:31 frame #16: 0x00000001019bedd0 cc1`pass_vectorize::execute(this=3D0x0000600002604300, fun=3D0x000000011500= d000) const at tree-vectorizer.cc:1296:33 frame #17: 0x0000000101382584 cc1`execute_one_pass(pass=3D0x00006000026= 04300) at passes.cc:2651:30 frame #18: 0x00000001013829c3 cc1`::execute_pass_list_1(pass=3D0x0000600002604300) at passes.cc:2760:28 frame #19: 0x00000001013829f4 cc1`::execute_pass_list_1(pass=3D0x000060000260f480) at passes.cc:2761:22 frame #20: 0x00000001013829f4 cc1`::execute_pass_list_1(pass=3D0x000060000260e1c0) at passes.cc:2761:22 frame #21: 0x0000000101382a5a cc1`execute_pass_list(fn=3D0x000000011500= d000, pass=3D0x000060000260dec0) at passes.cc:2771:23 frame #22: 0x0000000100bb0866 cc1`cgraph_node::expand(this=3D0x0000000113d06220) 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=3D0x0000000113806000) at cgraphunit.cc:2398:= 24 frame #25: 0x0000000100bb24b4 cc1`symbol_table::finalize_compilation_unit(this=3D0x0000000113806000) at cgraphunit.cc:2583:11 frame #26: 0x0000000101552e17 cc1`::compile_file() at toplev.cc:471:41 frame #27: 0x0000000101556832 cc1`::do_compile(no_backend=3Dfalse) at toplev.cc:2126:24 frame #28: 0x0000000101556d76 cc1`toplev::main(this=3D0x0000000308b1333= a, argc=3D34, argv=3D0x0000000308b13490) at toplev.cc:2282:18 frame #29: 0x0000000101d53d18 cc1`main(argc=3D34, argv=3D0x0000000308b1= 3490) at main.cc:39:23=