https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116445
Bug ID: 116445 Summary: gcc.target/arm/unsigned-extend-2.c on Cortex-M55 and misses possible Cortex-M optimization Product: gcc Version: 13.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: azoff at gcc dot gnu.org Target Milestone: --- Cortex-M55 does not generate optimal code for gcc.target/arm/unsigned-extend-2.c. For Cortex-M3, and other Thumb2 targets, the generated code is: foo: movs r3, #8 .L2: and r0, r1, r0, lsr #1 subs r3, r3, #1 ands r3, r3, #255 bne .L2 bx lr For Cortex-M55 it's instead: foo: push {lr} movs r3, #8 dls lr, r3 .L2: and r0, r1, r0, lsr #1 subs r3, r3, #1 uxtb r3, r3 le lr, .L2 ldr pc, [sp], #4