]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Use explicit -ftree-cselim in tests using -fdump-tree-cselim-details
authorJoseph Myers <joseph@codesourcery.com>
Wed, 8 Sep 2021 14:57:20 +0000 (14:57 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 8 Sep 2021 14:57:20 +0000 (14:57 +0000)
When testing for Nios II (gcc-testresults shows this for various other
targets as well), tests scanning cselim dumps produce an UNRESOLVED
result because those dumps do not exist.

cselim is enabled conditionally by code in toplev.c:

  if (flag_tree_cselim == AUTODETECT_VALUE)
    {
      if (HAVE_conditional_move)
flag_tree_cselim = 1;
      else
flag_tree_cselim = 0;
    }

Add explicit -ftree-cselim to dg-options in the affected tests (as
already used by some other tests of cselim dumps) so that this dump
exists on all architectures.

Tested with no regressions with cross to nios2-elf, where this causes
the tests in question to PASS instead of being UNRESOLVED.

* gcc.dg/tree-ssa/pr89430-1.c, gcc.dg/tree-ssa/pr89430-2.c,
gcc.dg/tree-ssa/pr89430-3.c, gcc.dg/tree-ssa/pr89430-4.c,
gcc.dg/tree-ssa/pr89430-5.c, gcc.dg/tree-ssa/pr89430-6.c,
gcc.dg/tree-ssa/pr89430-7-comp-ref.c,
gcc.dg/tree-ssa/pr89430-8-mem-ref-size.c,
gcc.dg/tree-ssa/pr99473-1.c: Use -ftree-cselim.

gcc/testsuite/gcc.dg/tree-ssa/pr89430-1.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-2.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-3.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-4.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-5.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-6.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-7-comp-ref.c
gcc/testsuite/gcc.dg/tree-ssa/pr89430-8-mem-ref-size.c
gcc/testsuite/gcc.dg/tree-ssa/pr99473-1.c

index 8ee1850ac6327c32092c32a5680ba961a0818c0d..d9fb2edf54952d9a2680dc61fc2c023271677b06 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 unsigned test(unsigned k, unsigned b) {
         unsigned a[2];
index 9b96875ac7ab24b8beaeadedfb84eda9a136b16f..bb39df2be8e1c308e2d9a1d69dc546339fdc398b 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 int c;
 unsigned test(unsigned k, unsigned b) {
index 0fac9f9b9c7ea2cb5728c947be44d286b7cd3401..00166373267b504bdd63e15ac6d08f2492071420 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 unsigned a[2];
 unsigned test(unsigned k, unsigned b) {
index 54b8c11a407ba1e845e63d80c53605688402ce1b..127cbdf3d10ad6a534c0d4177e808d22c445005c 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 int *p;
 unsigned test(unsigned k, unsigned b) {
index b2d04119381341e6e8c455d5d77c93c2cac9d53a..6a00f54b545824cda0000516a3248432750f9d30 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 int test(int b, int k) {
     struct {
index 8d3c4f7cc6a3b75ba7c69ec5213a67f90ad6327c..ecc083ebebe51e42337632dd2bf691e0de03642d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 int test(int b, int k) {
     typedef struct {
index c35a2afc70b96351a9660bf2f93fff477e1b446c..4fad2d1eb132ad650c946590f856902978e86c16 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 typedef union {
   int i;
index f9e66aefb1370be4b6f7ac22ef11b8ce1b90776f..5f93112acf7d38bd7e207b333b7906e9137f444d 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
 
 int *t;
 
index a9fd5427694208d5f44097a00b35b3bbf0f8b6fe..0fda5663a801b0749a5a23c053e8bb2a27bca577 100644 (file)
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O2 -fallow-store-data-races -fdump-tree-cselim-details" } */
+/* { dg-options "-O2 -ftree-cselim -fallow-store-data-races -fdump-tree-cselim-details" } */
 
 void f (int*);