On BE, the extracted index for the leftmost element is 0
rather than 1, adjust the test case accordingly.
PR testsuite/108810
gcc/testsuite/ChangeLog:
* gcc.target/powerpc/fold-vec-extract-double.p9.c (testd_cst): Adjust
the extracted index for BE.
return vec_extract (vd2, si);
}
+#ifdef __BIG_ENDIAN__
+#define LEFTMOST_ELEMENT_INDEX 0
+#else
+#define LEFTMOST_ELEMENT_INDEX 1
+#endif
+
double
testd_cst (vector double vd2)
{
- return vec_extract (vd2, 1);
+ return vec_extract (vd2, LEFTMOST_ELEMENT_INDEX);
}