aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/powerpc/pr39902-2.c
blob: 463a36c1beed4583b34d6f5aed81199028386886 (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
/* Check that simplification "x*(-1)" -> "-x" is not performed for decimal
   float types.  */

/* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
/* { dg-options "-std=gnu99 -O -mcpu=power6" } */
/* { dg-final { scan-assembler-not "fneg" } } */

extern _Decimal32 a32, b32;
extern _Decimal64 a64, b64;
extern _Decimal128 a128, b128;

void
foo32 (void)
{
  b32 = a32 * -1.0DF;
}

void
foo64 (void)
{
  b64 = a64 * -1.0DD;
}

void
foo128 (void)
{
  b128 = a128 * -1.0DL;
}