Debian Codegraph @

gcc/testsuite/gcc.target/powerpc/fold-vec-mult-int128-p9.c

raw
1 /* Verify that overloaded built-ins for vec_mul with __int128
2 inputs produce the right results. */
3
4 /* { dg-do compile } */
5 /* { dg-options "-mdejagnu-cpu=power9 -mvsx -O2" } */
6 /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */
7 /* { dg-require-effective-target powerpc_vsx } */
8 /* { dg-require-effective-target int128 } */
9
10 #include "altivec.h"
11
12 vector signed __int128
13 test1 (vector signed __int128 x, vector signed __int128 y)
14 {
15 return vec_mul (x, y);
16 }
17
18 vector unsigned __int128
19 test2 (vector unsigned __int128 x, vector unsigned __int128 y)
20 {
21 return vec_mul (x, y);
22 }
23
24 /* { dg-final { scan-assembler-times {\mmulld\M|\mmaddld\M} 6 } } */
25 /* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */