]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: Fix cond-add-vec-2.C and make cond-add-vec-1.C test some more
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Wed, 29 Apr 2026 19:49:49 +0000 (12:49 -0700)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Wed, 29 Apr 2026 19:51:17 +0000 (12:51 -0700)
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 <andrew.pinski@oss.qualcomm.com>
gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-1.C
gcc/testsuite/g++.dg/tree-ssa/cond-add-vec-2.C

index ce5ee51be5283c8043f33c9558981f27095b53d0..9c7c1e0f138d022db162b91a963aa0dedca83d6c 100644 (file)
@@ -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" } } */
index 06c218f775147e3c08d820e8e3b6f4ed5cf77a3f..554f24bf8973064606a7a6fe331a5de0cfc6f619 100644 (file)
@@ -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" } } */