aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c
blob: 5f948b7212fba2908442ea1a0cf5c0c1bd129886 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/* { dg-do compile { target { powerpc*-*-linux* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-mcpu=power7 -O2" } */
/* { dg-final { scan-assembler-times "divwe "   1 } } */
/* { dg-final { scan-assembler-times "divweo "  1 } } */
/* { dg-final { scan-assembler-times "divweu "  1 } } */
/* { dg-final { scan-assembler-times "divweuo " 1 } } */
/* { dg-final { scan-assembler-not    "bl __builtin" } } */

int
div_we (int a, int b)
{
  return __builtin_divwe (a, b);
}

int
div_weo (int a, int b)
{
  return __builtin_divweo (a, b);
}

unsigned int
div_weu (unsigned int a, unsigned int b)
{
  return __builtin_divweu (a, b);
}

unsigned int
div_weuo (unsigned int a, unsigned int b)
{
  return __builtin_divweuo (a, b);
}