https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80239
Bug ID: 80239 Summary: [7 regression] 9% regression on dhrystone when targetting Cortex-M7 Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: rtl-optimization Assignee: unassigned at gcc dot gnu.org Reporter: thopre01 at gcc dot gnu.org Target Milestone: --- Target: arm-none-eabi Hi, Performance for dhrystone has regressed by 9% after commit r235184 when targeting Cortex-M7 with -O3 -fno-inline. I've tracked this to a couple of changes likes the following: - add r0, sp, #24 + add r5, sp, #16 str r1, [lr, #4] @ unaligned str r2, [lr, #8] @ unaligned - mov r5, r0 - str r0, [sp, #4] Where [sp, #4] appears to never be loaded again. The mov itself is problematic as well as removing all the extra str still made the code slower.