scan generic vector tests before lowering

Message ID 20230329084832.6FEFA3857C43@sourceware.org
State Repeat Merge
Headers
Series scan generic vector tests before lowering |

Checks

Context Check Description
snail/gcc-patch-check warning Git am fail log

Commit Message

Richard Biener March 29, 2023, 8:47 a.m. UTC
  The g++.dg/pr94920.C testcase looks for a specific number of
ABS_EXPRs but the vector example is prone to vector lowering so
the following instead of scanning the optimized dump scans the
forwprop1 dump which is before vector lowering and the point the
transforms should have happened.

Tested on riscv64-linux (where it previously failed) and x86_64-linux.

Pushed.

Richard.

	* g++.dg/pr94920.C: Scan forwprop1 instead of optimized.
---
 gcc/testsuite/g++.dg/pr94920.C | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/gcc/testsuite/g++.dg/pr94920.C b/gcc/testsuite/g++.dg/pr94920.C
index 126b00478d2..65ece36f8cc 100644
--- a/gcc/testsuite/g++.dg/pr94920.C
+++ b/gcc/testsuite/g++.dg/pr94920.C
@@ -1,6 +1,6 @@ 
 /* PR tree-optimization/94920 */
 /* { dg-do compile } */
-/* { dg-options "-O2 -Wno-psabi -fdump-tree-optimized" } */
+/* { dg-options "-O2 -Wno-psabi -fdump-tree-forwprop1" } */
 
 typedef int __attribute__((vector_size(4*sizeof(int)))) vint;
 
@@ -60,4 +60,4 @@  __attribute__((noipa)) int qux(int x) {
     return (x >= 0 ? x : 0) + (x >= 0 ? x : 0);
 }
 
-/* { dg-final {scan-tree-dump-times " ABS_EXPR " 6 "optimized" } } */
+/* { dg-final {scan-tree-dump-times " ABS_EXPR " 6 "forwprop1" } } */