vec_zeroextend.c fails on big-endian as it assumes
0 index is the lower part but it is not for
big-endian case. This fixes the problem by
using the correct index for the lower part
for big-endian.
Committed as obvious after a test on aarch64_be-linux-gnu.
ChangeLog:
* gcc.target/aarch64/vec_zeroextend.c: Fix for big-endian.
+2020-01-25 Andrew Pinski <apinski@marvell.com>
+
+ * gcc.target/aarch64/vec_zeroextend.c: Fix for big-endian.
+
2020-01-24 Jeff Law <law@redhat.com
PR tree-optimization/92788
#define vector __attribute__((vector_size(16) ))
+#define lowull (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? 1 : 0)
+#define lowui (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ ? 3 : 0)
+
+
vector unsigned long long
f1(vector unsigned long long b, vector unsigned int a)
{
- b[0] = a[0];
+ b[lowull] = a[lowui];
return b;
}
unsigned long long
f2(vector unsigned int a)
{
- return a[0];
+ return a[lowui];
}
/* { dg-final { scan-assembler-times {fmov} 2 } } */