]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
test: Fix FAIL of SAD tests for RVV
authorJuzhe-Zhong <juzhe.zhong@rivai.ai>
Tue, 7 Nov 2023 03:36:44 +0000 (11:36 +0800)
committerPan Li <pan2.li@intel.com>
Tue, 7 Nov 2023 07:26:17 +0000 (15:26 +0800)
RVV didn't explicitly enable SAD optab but we can vectorize it
since loop vectorizer is able to recognize SAD pattern for RVV during analysis.

Current scan check of explicit SAD pattern looks odd,
it should be more reasonable to check recognition of SAD pattern during Loop vectorize analysis.

Other SAD tests like slp-reduc-sad-2.c are checking pattern recognition instead of explicit pattern enable.
Fix SAD dump check to fix the FAILS for RVV.

gcc/testsuite/ChangeLog:

* gcc.dg/vect/slp-reduc-sad.c: Fix check.
* gcc.dg/vect/vect-reduc-sad.c: Ditto.

gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c
gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c

index faa1c16d1a7eec546feee50f060aeefc2625da8d..977cfabde115a21dc96bf34a733aee64c469a8b1 100644 (file)
@@ -57,6 +57,6 @@ main ()
   return 0;
 }
 
-/* { dg-final { scan-tree-dump "sad pattern recognized" "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump "vectorizing stmts using SLP" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
index 2f0bb692564daa00c9ab82225f97c8ae893d4f8c..08f79874e9ca395e5004930672a7fe3466f6a5c6 100644 (file)
@@ -51,6 +51,6 @@ main (void)
   return 0;
 }
 
-/* { dg-final { scan-tree-dump-times "sad pattern recognized" 1 "vect" } } */
+/* { dg-final { scan-tree-dump "vect_recog_sad_pattern: detected" "vect" } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */