Skip to content

Commit

Permalink
test: Fix FAIL of SAD tests for RVV
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
zhongjuzhe authored and ouuleilei-bot committed Nov 7, 2023
1 parent c2d62cd commit dac0f55
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcc/testsuite/gcc.dg/vect/slp-reduc-sad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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" } } */
2 changes: 1 addition & 1 deletion gcc/testsuite/gcc.dg/vect/vect-reduc-sad.c
Original file line number Diff line number Diff line change
Expand Up @@ -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" } } */

0 comments on commit dac0f55

Please sign in to comment.