aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/maddld-1.c
blob: 4edecf1c86d8bdec6892ffd46f08fe4a7ab4604e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/* { dg-do compile } */
/* { dg-options "-mdejagnu-cpu=power9 -O2" } */

/* This file tests the maddld instruction can be used in SI mode
   on power9 machine.  */

int
s_madd (int a, int b, int c)
{
  return (a * b) + c;
}

unsigned int
u_madd (unsigned int a, unsigned int b, unsigned int c)
{
  return (a * b) + c;
}

/* { dg-final { scan-assembler-times {\mmaddld\s} 2 } } */
/* { dg-final { scan-assembler-not   {\mmul} } } */
/* { dg-final { scan-assembler-not   {\madd} } } */