summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/405-machhwu-2.c
blob: 3a98d1b3dbc48182eec31812a0be528ed1331cc5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* Test generation of machhwu. on 405.  */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -mcpu=405" } */
/* { dg-skip-if "other options override -mcpu=405" { ! powerpc_405_nocache } } */

/* { dg-final { scan-assembler "machhwu\\. " } } */

unsigned int
f(unsigned int a, unsigned int b, unsigned int c)
{
  a += (b >> 16) * (c >> 16);
  if (!a)
    return 10;
  return a;
}