From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E163B389042F; Mon, 8 Mar 2021 08:16:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E163B389042F From: "marxin at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/99421] ICE:in code_motion_process_successors, at sel-sched.c:6389 on aarch64 Date: Mon, 08 Mar 2021 08:16:30 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: marxin at gcc dot gnu.org X-Bugzilla-Status: WAITING 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: Message-ID: In-Reply-To: References: 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Mar 2021 08:16:31 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D99421 --- Comment #3 from Martin Li=C5=A1ka --- Confirmed, reduced test-case: $ cat predict.ii typedef struct { int *use } ssa_use_operand_t; enum { GIMPLE_PHI, GIMPLE_UNARY_RHS, GIMPLE_SINGLE_RHS } gimple_num_ops; gimple_call_fndecl_addr_0_0, gimple_call_num_args, gimple_phi_num_args, gimple_phi_arg_imm_use_ptr_gs_0_0, expr_expected_value_1___trans_tmp_13, expr_expected_value_1___trans_tmp_11, expr_expected_value_1_def_0_0, expr_expected_value_1_new_val, expr_expected_value_1_val_0_1, expr_expected_value_1_code, expr_expected_value_1_op1, expr_expected_value_1___trans_tmp_4, expr_expected_value_1___trans_tmp_= 2, expr_expected_value_1_decl_0_0, expr_expected_value_1_val; *expr_expected_value_1_op0; get_gimple_rhs_class() {} gimple_call_fndecl() { addr(); if (gimple_call_fndecl_addr_0_0) return addr; return 0; } bb_estimate_probability_locally_bb() { # 2 "predict.c" } static *expr_expected_value_1() { if (get_gimple_rhs_class =3D=3D GIMPLE_SINGLE_RHS) { if (expr_expected_value_1_op0) return expr_expected_value_1_op0; if (expr_expected_value_1_code) return 0; if (bitmap_bit_p()) return 0; bitmap_set_bit(); if (expr_expected_value_1_def_0_0) { int n =3D gimple_phi_num_args, val; for (; n;) { gimple_phi_arg_imm_use_ptr_gs_0_0 ? fancy_abort() : 0; ssa_use_operand_t *use; if (use->use =3D=3D 0) continue; expr_expected_value_1(); if (expr_expected_value_1_new_val) return 0; if (!val) ; else if (operand_equal_p()) return 0; } return expr_expected_value_1_new_val; } if (expr_expected_value_1___trans_tmp_11) { if (gimple_op()) return 0; gimple_op(); gimple_assign_rhs1(); gimple_assign_rhs_code(); if (gimple_num_ops) gimple_op(); return expr_expected_value_1(); } if (expr_expected_value_1___trans_tmp_13) { int decl =3D gimple_call_fndecl(); if (!decl) return 0; if (expr_expected_value_1_decl_0_0) { if (gimple_call_num_args) return 0; gimple_call_arg(); if (expr_expected_value_1_val_0_1) return &expr_expected_value_1_val; return gimple_call_arg(); } } return 0; } if (get_gimple_rhs_class()) { int *res; expr_expected_value_1(); if (expr_expected_value_1_op0) return 0; expr_expected_value_1(); if (expr_expected_value_1_op1) return 0; fold_build2_stat_loc(); if (expr_expected_value_1___trans_tmp_2) return res; return 0; } if (get_gimple_rhs_class =3D=3D GIMPLE_UNARY_RHS) { int *res; expr_expected_value_1(); if (expr_expected_value_1_op0) return 0; fold_build1_stat_loc(); if (expr_expected_value_1___trans_tmp_4) return res; return 0; } return 0; }=