1 /* { dg-do run { target { powerpc*-*-* } } } */ 2 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power9" } } */ 3 /* { dg-require-effective-target p9vector_hw } */ 4 /* { dg-options "-mcpu=power9" } */ 5 6 /* This test should succeed on 32-bit and 64-bit configurations. */ 7 #include <altivec.h> 8 #include <stdlib.h> 9 10 int compare_exponents_lt(double * exponent1_p,double * exponent2_p)11compare_exponents_lt (double *exponent1_p, double *exponent2_p) 12 { 13 double exponent1 = *exponent1_p; 14 double exponent2 = *exponent2_p; 15 16 return scalar_cmp_exp_lt (exponent1, exponent2); 17 } 18 19 int main()20main () 21 { 22 double x = (double) (0x1100LL << 50); 23 double y = (double) (0x1101LL << 50); 24 double z = (double) (0x1101LL << 37); 25 26 if (compare_exponents_lt (&x, &y)) 27 abort (); 28 if (!compare_exponents_lt (&z, &x)) 29 abort (); 30 return 0; 31 } 32