+2019-08-09 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * gcc.target/powerpc/vec_rotate-1.c: Rename to ...
+ * gcc.target/powerpc/vec-rotate-1.c: ... this. Add -maltivec option.
+ * gcc.target/powerpc/vec_rotate-2.c: Rename to ...
+ * gcc.target/powerpc/vec-rotate-2.c: ... this.
+ * gcc.target/powerpc/vec_rotate-3.c: Rename to ...
+ * gcc.target/powerpc/vec-rotate-3.c: ... this. Add -maltivec option.
+ * gcc.target/powerpc/vec_rotate-4.c: Rename to ...
+ * gcc.target/powerpc/vec-rotate-4.c: ... this.
+
2019-08-09 Sam Tebbs <sam.tebbs@arm.com>
* lib/target-supports.exp
--- /dev/null
+/* { dg-options "-O3 -maltivec" } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+
+/* Check vectorizer can exploit vector rotation instructions on Power, mainly
+ for the case rotation count is const number.
+
+ Check for instructions vrlb/vrlh/vrlw only available if altivec supported. */
+
+#define N 256
+unsigned int suw[N], ruw[N];
+unsigned short suh[N], ruh[N];
+unsigned char sub[N], rub[N];
+
+void
+testUW ()
+{
+ for (int i = 0; i < 256; ++i)
+ ruw[i] = (suw[i] >> 8) | (suw[i] << (sizeof (suw[0]) * 8 - 8));
+}
+
+void
+testUH ()
+{
+ for (int i = 0; i < 256; ++i)
+ ruh[i] = (unsigned short) (suh[i] >> 9)
+ | (unsigned short) (suh[i] << (sizeof (suh[0]) * 8 - 9));
+}
+
+void
+testUB ()
+{
+ for (int i = 0; i < 256; ++i)
+ rub[i] = (unsigned char) (sub[i] >> 5)
+ | (unsigned char) (sub[i] << (sizeof (sub[0]) * 8 - 5));
+}
+
+/* { dg-final { scan-assembler {\mvrlw\M} } } */
+/* { dg-final { scan-assembler {\mvrlh\M} } } */
+/* { dg-final { scan-assembler {\mvrlb\M} } } */
--- /dev/null
+/* { dg-options "-O3 -mdejagnu-cpu=power8" } */
+
+/* Check vectorizer can exploit vector rotation instructions on Power8, mainly
+ for the case rotation count is const number.
+
+ Check for vrld which is available on Power8 and above. */
+
+#define N 256
+unsigned long long sud[N], rud[N];
+
+void
+testULL ()
+{
+ for (int i = 0; i < 256; ++i)
+ rud[i] = (sud[i] >> 8) | (sud[i] << (sizeof (sud[0]) * 8 - 8));
+}
+
+/* { dg-final { scan-assembler {\mvrld\M} } } */
--- /dev/null
+/* { dg-options "-O3 -maltivec" } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+
+/* Check vectorizer can exploit vector rotation instructions on Power, mainly
+ for the case rotation count isn't const number.
+
+ Check for instructions vrlb/vrlh/vrlw only available if altivec supported. */
+
+#define N 256
+unsigned int suw[N], ruw[N];
+unsigned short suh[N], ruh[N];
+unsigned char sub[N], rub[N];
+extern unsigned char rot_cnt;
+
+void
+testUW ()
+{
+ for (int i = 0; i < 256; ++i)
+ ruw[i] = (suw[i] >> rot_cnt) | (suw[i] << (sizeof (suw[0]) * 8 - rot_cnt));
+}
+
+void
+testUH ()
+{
+ for (int i = 0; i < 256; ++i)
+ ruh[i] = (unsigned short) (suh[i] >> rot_cnt)
+ | (unsigned short) (suh[i] << (sizeof (suh[0]) * 8 - rot_cnt));
+}
+
+void
+testUB ()
+{
+ for (int i = 0; i < 256; ++i)
+ rub[i] = (unsigned char) (sub[i] >> rot_cnt)
+ | (unsigned char) (sub[i] << (sizeof (sub[0]) * 8 - rot_cnt));
+}
+
+/* { dg-final { scan-assembler {\mvrlw\M} } } */
+/* { dg-final { scan-assembler {\mvrlh\M} } } */
+/* { dg-final { scan-assembler {\mvrlb\M} } } */
--- /dev/null
+/* { dg-options "-O3 -mdejagnu-cpu=power8" } */
+
+/* Check vectorizer can exploit vector rotation instructions on Power8, mainly
+ for the case rotation count isn't const number.
+
+ Check for vrld which is available on Power8 and above. */
+
+#define N 256
+unsigned long long sud[N], rud[N];
+extern unsigned char rot_cnt;
+
+void
+testULL ()
+{
+ for (int i = 0; i < 256; ++i)
+ rud[i] = (sud[i] >> rot_cnt) | (sud[i] << (sizeof (sud[0]) * 8 - rot_cnt));
+}
+
+/* { dg-final { scan-assembler {\mvrld\M} } } */
+++ /dev/null
-/* { dg-options "-O3" } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
-
-/* Check vectorizer can exploit vector rotation instructions on Power, mainly
- for the case rotation count is const number.
-
- Check for instructions vrlb/vrlh/vrlw only available if altivec supported. */
-
-#define N 256
-unsigned int suw[N], ruw[N];
-unsigned short suh[N], ruh[N];
-unsigned char sub[N], rub[N];
-
-void
-testUW ()
-{
- for (int i = 0; i < 256; ++i)
- ruw[i] = (suw[i] >> 8) | (suw[i] << (sizeof (suw[0]) * 8 - 8));
-}
-
-void
-testUH ()
-{
- for (int i = 0; i < 256; ++i)
- ruh[i] = (unsigned short) (suh[i] >> 9)
- | (unsigned short) (suh[i] << (sizeof (suh[0]) * 8 - 9));
-}
-
-void
-testUB ()
-{
- for (int i = 0; i < 256; ++i)
- rub[i] = (unsigned char) (sub[i] >> 5)
- | (unsigned char) (sub[i] << (sizeof (sub[0]) * 8 - 5));
-}
-
-/* { dg-final { scan-assembler {\mvrlw\M} } } */
-/* { dg-final { scan-assembler {\mvrlh\M} } } */
-/* { dg-final { scan-assembler {\mvrlb\M} } } */
+++ /dev/null
-/* { dg-options "-O3 -mdejagnu-cpu=power8" } */
-
-/* Check vectorizer can exploit vector rotation instructions on Power8, mainly
- for the case rotation count is const number.
-
- Check for vrld which is available on Power8 and above. */
-
-#define N 256
-unsigned long long sud[N], rud[N];
-
-void
-testULL ()
-{
- for (int i = 0; i < 256; ++i)
- rud[i] = (sud[i] >> 8) | (sud[i] << (sizeof (sud[0]) * 8 - 8));
-}
-
-/* { dg-final { scan-assembler {\mvrld\M} } } */
+++ /dev/null
-/* { dg-options "-O3" } */
-/* { dg-require-effective-target powerpc_altivec_ok } */
-
-/* Check vectorizer can exploit vector rotation instructions on Power, mainly
- for the case rotation count isn't const number.
-
- Check for instructions vrlb/vrlh/vrlw only available if altivec supported. */
-
-#define N 256
-unsigned int suw[N], ruw[N];
-unsigned short suh[N], ruh[N];
-unsigned char sub[N], rub[N];
-extern unsigned char rot_cnt;
-
-void
-testUW ()
-{
- for (int i = 0; i < 256; ++i)
- ruw[i] = (suw[i] >> rot_cnt) | (suw[i] << (sizeof (suw[0]) * 8 - rot_cnt));
-}
-
-void
-testUH ()
-{
- for (int i = 0; i < 256; ++i)
- ruh[i] = (unsigned short) (suh[i] >> rot_cnt)
- | (unsigned short) (suh[i] << (sizeof (suh[0]) * 8 - rot_cnt));
-}
-
-void
-testUB ()
-{
- for (int i = 0; i < 256; ++i)
- rub[i] = (unsigned char) (sub[i] >> rot_cnt)
- | (unsigned char) (sub[i] << (sizeof (sub[0]) * 8 - rot_cnt));
-}
-
-/* { dg-final { scan-assembler {\mvrlw\M} } } */
-/* { dg-final { scan-assembler {\mvrlh\M} } } */
-/* { dg-final { scan-assembler {\mvrlb\M} } } */
+++ /dev/null
-/* { dg-options "-O3 -mdejagnu-cpu=power8" } */
-
-/* Check vectorizer can exploit vector rotation instructions on Power8, mainly
- for the case rotation count isn't const number.
-
- Check for vrld which is available on Power8 and above. */
-
-#define N 256
-unsigned long long sud[N], rud[N];
-extern unsigned char rot_cnt;
-
-void
-testULL ()
-{
- for (int i = 0; i < 256; ++i)
- rud[i] = (sud[i] >> rot_cnt) | (sud[i] << (sizeof (sud[0]) * 8 - rot_cnt));
-}
-
-/* { dg-final { scan-assembler {\mvrld\M} } } */