cse: Add test case. [PR94740]
authorPeter Bergner <bergner@linux.ibm.com>
Thu, 30 Apr 2020 23:21:30 +0000 (18:21 -0500)
committerPeter Bergner <bergner@linux.ibm.com>
Thu, 30 Apr 2020 23:21:30 +0000 (18:21 -0500)
PR rtl-optimization/94740
* gcc.target/powerpc/pr94740.c: New test.

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/pr94740.c [new file with mode: 0644]

index 3df8a19a4d9db9b18c2c89462d9d50aa79d79dc5..dbd464633f2fd4596102569dd09285643a695f1c 100644 (file)
@@ -1,3 +1,8 @@
+2020-04-30  Peter Bergner  <bergner@linux.ibm.com>
+
+       PR rtl-optimization/94740
+       * gcc.target/powerpc/pr94740.c: New test.
+
 2020-04-30  Jakub Jelinek  <jakub@redhat.com>
 
        PR c/94842
diff --git a/gcc/testsuite/gcc.target/powerpc/pr94740.c b/gcc/testsuite/gcc.target/powerpc/pr94740.c
new file mode 100644 (file)
index 0000000..78e40fc
--- /dev/null
@@ -0,0 +1,11 @@
+/* PR rtl-optimization/94740 */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_future_ok } */
+/* { dg-options "-O2 -mdejagnu-cpu=future -mpcrel" } */
+
+int array[8];
+int
+foo (void)
+{
+  return __builtin_bswap32 (array[1]);
+}