https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80155
Bug ID: 80155 Summary: [7 regression] Performance regression with code hoisting enabled Product: gcc Version: 7.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: thopre01 at gcc dot gnu.org CC: avieira at gcc dot gnu.org, rguenth at gcc dot gnu.org Target Milestone: --- Target: arm-none-eabi Created attachment 41022 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=41022&action=edit Reproducers for Cortex-M0+ and Cortex-M7 Hi, Performance of a popular embedded benchmark regress in GCC 7 at -O2 optimization level on arm-none-eabi targets (at least on Cortex-M0+ or Cortex-M7). They key to trigger it is to have -fcode-hoisting enabled. If disabled, performance is improved. Attached to this bug report are reduced testcase for Cortex-M0+ and Cortex-M7. Compile respectively with: arm-none-eabi-gcc -S -O2 -mcpu=cortex-m0plus arm-none-eabi-gcc -S -O2 -mcpu=cortex-m7 and compare to the same command line with the extra -fno-code-hoisting option added to see the amount of register push decrease.