https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80155
--- Comment #22 from Thomas Preud'homme <thopre01 at gcc dot gnu.org> --- (In reply to Thomas Preud'homme from comment #21) > > I can see this behavior for Cortex-M0+ indeed but the results are different > for Cortex-M7 for me: > > <with code hoisting> > % arm-none-linux-gnueabi-gcc -S ~/cortex-m0plus_reproducer.c -O2 > -mcpu=cortex-m7 -mthumb -fdump-tree-pre-details -fdump-tree-crited > -fdump-tree-all -funroll-all-loops > > % grep push cortex-m0plus_reproducer.s > push {r4, r5} > > > <without code hoisting> > % arm-none-linux-gnueabi-gcc -S ~/cortex-m0plus_reproducer.c -O2 > -mcpu=cortex-m7 -mthumb -fdump-tree-pre-details -fdump-tree-crited > -fdump-tree-all -funroll-all-loops -fno-code-hoisting > > % grep push cortex-m0plus_reproducer.s > push {r4} > > Would you mind checking again? btw, this toolchain was built on 2017-04-04 in case that's the issue.