OSDN Git Service

PR target/39558
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / powerpc / 405-macchwu-2.c
1 /* Test generation of macchwu. on 405.  */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do compile } */
4 /* { dg-require-effective-target ilp32 } */
5 /* { dg-options "-O2 -mcpu=405" } */
6 /* { dg-skip-if "other options override -mcpu=405" { ! powerpc_405_nocache } { "*" } { "" } } */
7
8 /* { dg-final { scan-assembler "macchwu\\. " } } */
9
10 unsigned int
11 f(unsigned int a, unsigned int b, unsigned int c)
12 {
13   a += (unsigned short)b * (c >> 16);
14   if (!a)
15     return 10;
16   return a;
17 }