summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c')
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c b/gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c
new file mode 100644
index 00000000000..ae77694008e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-cell-7.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-O2 -maltivec -mabi=altivec -mcpu=cell" } */
+/* { dg-final { scan-assembler-times "vor" 2 } } */
+#include <altivec.h>
+
+/* Make sure that lvlx and lvrx are not combined into one insn and
+ we still get a vor. */
+
+vector unsigned char
+lvx_float (long off, float *p)
+{
+ vector unsigned char l, r;
+
+ l = (vector unsigned char) vec_lvlx (off, p);
+ r = (vector unsigned char) vec_lvrx (off, p);
+ return vec_or(l, r);
+}
+
+vector unsigned char
+lvxl_float (long off, float *p)
+{
+ vector unsigned char l, r;
+
+ l = (vector unsigned char) vec_lvlxl (off, p);
+ r = (vector unsigned char) vec_lvrxl (off, p);
+ return vec_or(l, r);
+}