1 /* { dg-do run { target { powerpc*-*-linux* } } } */
2 /* { dg-options "-mvsx -O2" } */
3 /* { dg-require-effective-target powerpc_p9vector_ok } */
4 /* { dg-require-effective-target ppc_cpu_supports_hw } */
9 /* Power9 (aka, ISA 3.0) has a MODSD instruction to do modulus, while Power8
10 (aka, ISA 2.07) has to do modulus with divide and multiply. Make sure that
11 the basic support for target_clones runs.
13 Restrict ourselves to Linux, since IFUNC might not be supported in other
16 __attribute__((__target_clones__("cpu=power9,default")))
17 long mod_func (long a
, long b
)
27 if (mod_func (X
, Y
) != (X
% Y
))