1 /* { dg-do compile } */
2 /* { dg-options "-mdejagnu-cpu=power9 -O2" } */
3
4 /* This file tests the maddld instruction can be used in SI mode
5 on power9 machine. */
6
7 int
8 s_madd (int a, int b, int c)
9 {
10 return (a * b) + c;
11 }
12
13 unsigned int
14 u_madd (unsigned int a, unsigned int b, unsigned int c)
15 {
16 return (a * b) + c;
17 }
18
19 /* { dg-final { scan-assembler-times {\mmaddld\s} 2 } } */
20 /* { dg-final { scan-assembler-not {\mmul} } } */
21 /* { dg-final { scan-assembler-not {\madd} } } */