http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58424

            Bug ID: 58424
           Summary: [ARM]gcc.target/arm/pr42575.c failed on arm
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: amker.cheng at gmail dot com

gcc is at revision r202599 and is configured as:
../gcc/configure
build=i686-linux-gnu
host=i686-linux-gnu
target=arm-none-eabi
prefix=.../trunk-orig/target/
disable-decimal-float
disable-libffi
disable-libgomp
disable-libmudflap
disable-libquadmath
disable-libssp
disable-libstdcxx-pch
disable-nls
disable-shared
disable-threads
disable-tls
with-gnu-as
with-gnu-ld
with-newlib
with-headers=yes
with-sysroot=.../trunk-orig/target/arm-none-eabi
with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm'
with-mode=thumb
with-arch=armv7-m
disable-multilib
enable-lto
enable-languages=c,c++,lto

The source code is:
/* { dg-options "-O2" }  */
/* Make sure RA does good job allocating registers and avoids
   unnecessary moves.  */
/* { dg-final { scan-assembler-not "mov" } } */

long long longfunc(long long x, long long y)
{
      return x * y;
}


The generated assembly is:
longfunc:
    @ args = 0, pretend = 0, frame = 0
    @ frame_needed = 0, uses_anonymous_args = 0
    @ link register save eliminated.
    mul    r3, r0, r3
    push    {r4, r5}
    mla    r1, r2, r1, r3
    umull    r4, r5, r0, r2
    add    r5, r5, r1
    mov    r0, r4
    mov    r1, r5
    pop    {r4, r5}
    bx    lr
    .size    longfunc, .-longfunc

But I think the case would fail for other configurations too.

Reply via email to