diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/440-mullhw-2.c')
-rw-r--r-- | gcc/testsuite/gcc.target/powerpc/440-mullhw-2.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/440-mullhw-2.c b/gcc/testsuite/gcc.target/powerpc/440-mullhw-2.c new file mode 100644 index 000000000..023eb7187 --- /dev/null +++ b/gcc/testsuite/gcc.target/powerpc/440-mullhw-2.c @@ -0,0 +1,16 @@ +/* Test generation of mullhw. on 440. */ +/* Origin: Joseph Myers <joseph@codesourcery.com> */ +/* { dg-do compile } */ +/* { dg-require-effective-target ilp32 } */ +/* { dg-options "-O2 -mcpu=440" } */ + +/* { dg-final { scan-assembler "mullhw\\. " } } */ + +int +f(int b, int c) +{ + int a = (short)b * (short)c; + if (!a) + return 10; + return a; +} |