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