https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121498
--- Comment #5 from liu mirko <lw297073896 at gmail dot com> --- (In reply to Andrew Pinski from comment #3) > Confirmed. Though the code is not enough to reproduce the issue. > > ``` > (define_insn "*branch<mode>" > [(set (pc) > (if_then_else > (match_operator 1 "ordered_comparison_operator" > [(match_operand:X 2 "register_operand" "r") > (match_operand:X 3 "reg_or_0_operand" "rJ")]) > (label_ref (match_operand 0 "" "")) > (pc)))] > "!TARGET_XCVBI" > { > if (get_attr_length (insn) == 12) > return "b%r1\t%2,%z3,1f; jump\t%l0,ra; 1:"; > > return "b%C1\t%2,%z3,%l0"; > } > [(set_attr "type" "branch") > (set_attr "mode" "none")]) > ``` > Basically the problem is the long conditional branch requires ra to do the > jump in some cases but the rtl pattern does not model this at all. In this instruction template, I also found another issue:the code in the branch "if (get_attr_length (insn) == 12)" does not take effect when it contains asm volatile("nop; nop; ... nop;//over 1MB code").