testsuite: Use explicit -ftree-cselim in tests using -fdump-tree-cselim-details

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.
This commit is contained in:
Joseph Myers 2021-09-08 14:57:20 +00:00
parent 86e6268cff
commit d081516ae1
9 changed files with 9 additions and 9 deletions

View 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];

View 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) {

View 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) {

View 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) {

View 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 {

View 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 {

View 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;

View 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;

View 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*);