https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64154
Bug ID: 64154 Summary: enable fuse-caller-save for Thumb1 Product: gcc Version: 5.0 Status: UNCONFIRMED Severity: enhancement Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: vries at gcc dot gnu.org For PR 63718, we disabled -fuse-caller-save for Thumb1 in arm.c: ... /* In Thumb1 mode, we emit the epilogue in RTL, but the last insn - epilogue_insns - does not accurately model the corresponding insns emitted in the asm file. In particular, see the comment in thumb_exit 'Find out how many of the (return) argument registers we can corrupt'. As a consequence, the epilogue may clobber registers without fuse-caller-save finding out about it. Therefore, disable fuse-caller-save in Thumb1 mode. TODO: Accurately model clobbers for epilogue_insns and reenable fuse-caller-save. */ if (TARGET_THUMB1) flag_use_caller_save = 0; ... We want to fix the target to properly model the clobbers in the rtl insn epilogue_insns, such that we can re-enable -fuse-caller-save.