Debian Codegraph @

gcc/testsuite/gcc.dg/vect/vect-switch-search-line-fast.c

raw
1 /* PR116126 -- once this works use this version in libcpp/lex.c.
2 This also requires working value range propagation for s/end. */
3 /* { dg-do compile } */
4 /* { dg-add-options vect_early_break } */
5 /* { dg-require-effective-target vect_early_break } */
6 /* { dg-require-effective-target vect_int } */
7
8 const unsigned char *search_line_fast2 (const unsigned char *s,
9 const unsigned char *end)
10 {
11 while (s < end) {
12 if (*s == '\n' || *s == '\r' || *s == '\\' || *s == '?')
13 break;
14 s++;
15 }
16 return s;
17 }
18
19 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ilp32 || { amdgcn*-*-* } } } } } */
20 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! { ilp32 || { amdgcn*-*-* } } } } } } */