1 /* Check that the __builtin_strlen function is inlined with cmp/str
2 when optimizing for speed. */
3 /* { dg-do compile } */
4 /* { dg-options "-O2" } */
5 /* { dg-final { scan-assembler-not "jmp" } } */
6 /* { dg-final { scan-assembler-times "cmp/str" 2 } } */
7 /* { dg-final { scan-assembler-times "tst\t#3" 1 } } */
10 test00 (const char *s1
)
12 return __builtin_strlen (s1
);
15 /* Check that no test for alignment is needed. */
17 test03 (const char *s1
)
19 return __builtin_strlen (__builtin_assume_aligned (s1
, 4));