Basically we need to test earlier in release_ssa instead
of optimization which is before vec lowering happens.
Also "return a_" to be expanded to match "<retval> = a_"
for vector types that return via memory.
Also add -Wno-psabi to avoid a warning/note about the vector
argument.

Pushed as obvious after testing on x86_64-linux-gnu with both
-m64 and -m32/-mno-sse to invoke the cases that matter here.

gcc/testsuite/ChangeLog:

        * gcc.dg/tree-ssa/pr112095.c: Add -Wno-psabi to the options.
        Look at release_ssa instead of optimization. Match
        "<retval> = a_" in addition to "return a_".

Signed-off-by: Andrew Pinski <[email protected]>
---
 gcc/testsuite/gcc.dg/tree-ssa/pr112095.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr112095.c 
b/gcc/testsuite/gcc.dg/tree-ssa/pr112095.c
index 992d0e1f29d..f3080c1e476 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr112095.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr112095.c
@@ -1,5 +1,5 @@
 /* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-options "-O -fdump-tree-release_ssa -Wno-psabi" } */
 
 typedef signed int s32;
 typedef unsigned char u8;
@@ -121,7 +121,7 @@ vg (v4ui a, v4ui b)
 }
 
 /* f* and vf should simplify to return a.  */
-/* { dg-final { scan-tree-dump-times "return a_" 6 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "return a_|<retval> = a_" 6 "release_ssa" 
} } */
 
 /* g* and vg should simplify to ~a directly.  */
-/* { dg-final { scan-tree-dump-times "= ~a" 6 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= ~a" 6 "release_ssa" } } */
-- 
2.43.0

Reply via email to