From: Andrew Pinski Date: Wed, 29 Apr 2026 19:49:49 +0000 (-0700) Subject: testsuite: Fix cond-add-vec-2.C and make cond-add-vec-1.C test some more X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad2d8a375404628de396380bb36e6f81c054c4e1;p=thirdparty%2Fgcc.git testsuite: Fix cond-add-vec-2.C and make cond-add-vec-1.C test some more With -march=cascadelake/-mavx512f, the VEC_COND_EXPR is turned into a COND_ADD. This breaks cond-add-vec-2.C check to make sure the conditional add is still there. So we need to check for COND_ADD or VEC_COND_EXPR in forwprop1. Even though cond-add-vec-1.C works right now, it is best to make sure COND_ADD is not there. Pushed as obvious after testing with and without -march=cascadelake on x86_64. gcc/testsuite/ChangeLog: * g++.dg/tree-ssa/cond-add-vec-1.C: Add a check to make sure COND_ADD is not there either. * g++.dg/tree-ssa/cond-add-vec-2.C: Change the check for VEC_COND_EXPR to allow for COND_ADD. Signed-off-by: Andrew Pinski --- diff --git a/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-1.C b/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-1.C index ce5ee51be52..9c7c1e0f138 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-1.C +++ b/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-1.C @@ -34,3 +34,4 @@ f3 (vector4_u8 unsigned char x) } /* { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "forwprop1" } } */ +/* { dg-final { scan-tree-dump-not "COND_ADD" "forwprop1" } } */ diff --git a/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-2.C b/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-2.C index 06c218f7751..554f24bf897 100644 --- a/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-2.C +++ b/gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-2.C @@ -17,4 +17,4 @@ vector2_u64 unsigned long g2 (vector2_u64 unsigned long x) { : (vector2_u64 unsigned long){40, 40}; } -/* { dg-final { scan-tree-dump-times "VEC_COND_EXPR" 2 "forwprop1" } } */ +/* { dg-final { scan-tree-dump-times "VEC_COND_EXPR|COND_ADD" 2 "forwprop1" } } */