https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82034
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|WAITING |RESOLVED Resolution|--- |WORKSFORME --- Comment #4 from Richard Earnshaw <rearnsha at gcc dot gnu.org> --- Your example command line has no optimization flags on it, so it's not surprising that you don't see the idiom reduced. With gcc-7 and -O3 I get: sub sp, sp, #16 movs r1, #1 movs r2, #2 movs r3, #3 str r1, [sp, #4] str r2, [sp, #8] str r3, [sp, #12] ldr r0, [sp, #4] ldr r3, [sp, #8] ldr r2, [sp, #12] .syntax unified @ 15 "test.c" 1 smmlar r3, r3, r2, r0 @ 0 "" 2 .thumb .syntax unified add sp, sp, #16 @ sp needed bx lr