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

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Hmmm, the epilogue expansion in arm.md hits the HAVE_return path and does:
 emit_jump_insn (gen_return ());
with a comment saying:
     /* HAVE_return is testing for USE_RETURN_INSN (FALSE).  Hence,
        no need for explicit testing again.  */

But I don't think that comment is true (maybe it was true at some point in the
past?). There is no return optab in the arm backend gated on USE_RETURN_INSN
(FALSE)

USE_RETURN_INSN (FALSE) is used to gate *arm_return, which is what the RTL is
supposed to match, but does not end up matching.
This is all quite old code, but I think the safest fix at this stage is to add
a "&& USE_RETURN_INSN (FALSE)" check to that HAVE_return so that the
arm_expand_epilogue path is taken.

Reply via email to