From e0678350ea4ee367206898baa8830d2c79faa0a7 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Thu, 30 Jan 2020 09:39:57 -0700 Subject: [PATCH] Fix "regression" reported by c6x testing. * gcc.dg/tree-ssa/ssa-dse-26.c: Make existing dg-final scan conditional on !c6x. Add dg-final scan pattern for c6x. --- gcc/testsuite/ChangeLog | 5 +++++ gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-26.c | 11 +++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0247d2cd083..269adb29e94 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2020-01-30 Jeff Law PR middle-end/92323 diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-26.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-26.c index 836a8092ab9..8abc28baccb 100644 --- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-26.c +++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-26.c @@ -30,6 +30,13 @@ constraint_equal (struct constraint a, struct constraint b) && constraint_expr_equal (a.rhs, b.rhs); } -/* { dg-final { scan-tree-dump-times "Deleted dead store: x = " 1 "dse1" } } */ -/* { dg-final { scan-tree-dump-times "Deleted dead store: y = " 1 "dse1" } } */ +/* Most targets should be using this test. */ +/* { dg-final { scan-tree-dump-times "Deleted dead store: x = " 1 "dse1" { target { ! tic6x-*-* } } } } */ +/* { dg-final { scan-tree-dump-times "Deleted dead store: y = " 1 "dse1" { target { ! tic6x-*-* } } } } */ + +/* The c6x port generates significantly different gimple which + changes the SRA and DSE decisions. Verify we remove all + dead stores. */ +/* { dg-final { scan-tree-dump-times "Deleted dead store: \[ax\].. = " 2 "dse1" { target tic6x-*-* } } } */ +/* { dg-final { scan-tree-dump-times "Deleted dead store: \[by\].. = " 2 "dse1" { target tic6x-*-* } } } */ -- 2.30.2