]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: altivec.md (*altivec_lvxl_<mode>_internal): Output correct instruction.
authorBill Schmidt <wschmidt@linux.vnet.ibm.com>
Wed, 17 Feb 2016 17:55:33 +0000 (17:55 +0000)
committerWilliam Schmidt <wschmidt@gcc.gnu.org>
Wed, 17 Feb 2016 17:55:33 +0000 (17:55 +0000)
[gcc]

2016-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

Backport from mainline
2016-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* config/rs6000/altivec.md (*altivec_lvxl_<mode>_internal): Output
correct instruction.

[gcc/testsuite]

2016-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

Backport from mainline
2012-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

* gcc.target/powerpc/vec-cg.c: New test.

From-SVN: r233504

gcc/ChangeLog
gcc/config/rs6000/altivec.md
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/vec-cg.c [new file with mode: 0644]

index 9ad8a0adf6471ea5417b44d1e4037697de531653..b8bd435ece37e29b797c936712eaa27e361b46a5 100644 (file)
@@ -1,3 +1,11 @@
+2016-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       Backport from mainline
+       2016-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * config/rs6000/altivec.md (*altivec_lvxl_<mode>_internal): Output
+       correct instruction.
+
 2016-02-17  Bernd Schmidt  <bschmidt@redhat.com>
 
        Backport from mainline
index 63e72370e0f19a95ee9137276fea7dfcc561c34f..22346e1c563d9af27ec7e4915b6f86ded00ad69a 100644 (file)
          (match_operand:VM2 1 "memory_operand" "Z"))
      (unspec [(const_int 0)] UNSPEC_SET_VSCR)])]
   "TARGET_ALTIVEC"
-  "lvx %0,%y1"
+  "lvxl %0,%y1"
   [(set_attr "type" "vecload")])
 
 (define_expand "altivec_lvx_<mode>"
index f89344c351f11c10766c36b3c505afc514b92fa4..3be3e1c4a05644187e1d3a6259949f16dde020c5 100644 (file)
@@ -1,3 +1,10 @@
+2016-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       Backport from mainline
+       2012-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+       * gcc.target/powerpc/vec-cg.c: New test.
+
 2016-02-17  Bernd Schmidt  <bschmidt@redhat.com>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.target/powerpc/vec-cg.c b/gcc/testsuite/gcc.target/powerpc/vec-cg.c
new file mode 100644 (file)
index 0000000..c31d217
--- /dev/null
@@ -0,0 +1,22 @@
+/* Test code generation of vector built-ins.  We don't have this for
+   most of ours today.  As new built-ins are added, please add to this
+   test case.  Update as necessary to add VSX, P8-vector, P9-vector,
+   etc. */
+
+/* { dg-do compile { target powerpc*-*-* } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -O0" } */
+
+#include <altivec.h>
+
+static vector signed int i, *pi;
+static int int1;
+
+void
+b()
+{
+  i = __builtin_altivec_lvxl (int1, pi);
+  i = vec_lvxl (int1, pi);
+}
+
+/* { dg-final { scan-assembler-times "lvxl" 2 } } */