2018-03-08 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / gcc.target / powerpc / fold-vec-mult-int128-p9.c
blob5d3d4aaf9722bd016257a8ab13bbd922f9aa0e47
1 /* Verify that overloaded built-ins for vec_mul with __int128
2 inputs produce the right results. */
4 /* { dg-do compile } */
5 /* { dg-require-effective-target powerpc_p9vector_ok } */
6 /* { dg-require-effective-target int128 } */
7 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */
8 /* { dg-options "-mpower9-vector -mcpu=power9 -O2" } */
9 /* { dg-additional-options "-maix64" { target powerpc-ibm-aix* } } */
11 #include "altivec.h"
13 vector signed __int128
14 test1 (vector signed __int128 x, vector signed __int128 y)
16 return vec_mul (x, y);
19 vector unsigned __int128
20 test2 (vector unsigned __int128 x, vector unsigned __int128 y)
22 return vec_mul (x, y);
25 /* { dg-final { scan-assembler-times {\mmulld\M|\mmaddld\M} 6 } } */
26 /* { dg-final { scan-assembler-times {\mmulhdu\M} 2 } } */