1 /* { dg-do compile { target { powerpc*-*-* } } } */ 2 /* { dg-skip-if "" { powerpc*-*-darwin* } } */ 3 /* { dg-require-effective-target powerpc_vsx_ok } */ 4 /* { dg-skip-if "do not override -mcpu" { powerpc*-*-* } { "-mcpu=*" } { "-mcpu=power7" } } */ 5 /* { dg-options "-O1 -mvsx -mcpu=power7 -mlong-double-128" } */ 6 7 /* PR 67808: LRA ICEs on simple double to long double conversion test case */ 8 9 #if defined(__LONG_DOUBLE_IEEE128__) 10 /* If long double is IEEE 128-bit, we need to use the __ibm128 type instead of 11 long double. We can't use __ibm128 on systems that don't support IEEE 12 128-bit floating point, because the type is not enabled on those 13 systems. */ 14 #define LDOUBLE __ibm128 15 16 #elif defined(__LONG_DOUBLE_IBM128__) 17 #define LDOUBLE long double 18 19 #else 20 #error "long double must be either IBM 128-bit or IEEE 128-bit" 21 #endif 22 23 void dfoo(LDOUBLE * ldb1,double * db1)24dfoo (LDOUBLE *ldb1, double *db1) 25 { 26 *ldb1 = *db1; 27 } 28 29 LDOUBLE dfoo2(double * db1)30dfoo2 (double *db1) 31 { 32 return *db1; 33 } 34 35 LDOUBLE dfoo3(double x)36dfoo3 (double x) 37 { 38 return x; 39 } 40 41 void ffoo(LDOUBLE * ldb1,float * db1)42ffoo (LDOUBLE *ldb1, float *db1) 43 { 44 *ldb1 = *db1; 45 } 46 47 LDOUBLE ffoo2(float * db1)48ffoo2 (float *db1) 49 { 50 return *db1; 51 } 52 53 LDOUBLE ffoo3(float x)54ffoo3 (float x) 55 { 56 return x; 57 } 58 59 /* { dg-final { scan-assembler "xxlxor" } } */ 60