https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111500
--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Luke from comment #4)
> the a.i file for example #1a is:
> # 1 "a.c"
> # 1 "/tmp//"
> # 1 "<built-in>"
> # 1 "<command-line>"
> # 1 "a.c"
> void artiSUBS() {
> for (int i=100; i>0; i--)
> *(volatile int*)0xE000E014 = i;
> }
>
> the command-line was:
> > arm-none-eabi-gcc -save-temps -S a.c -O3 -g -mcpu=cortex-m0plus -mthumb
> > -Wall --specs=nosys.specs -nostdlib -fdata-sections -ffunction-sections
> > -ffreestanding -Winline
>
> and the resulting a.s file contains that subs/cmp sequence...
This is most likely a dup of bug 104773.