/* { dg-do compile } */ /* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */ #include template T *rawmemchr(T *s) { while (*s != pattern) ++s; return s; } template uint8_t *rawmemchr(uint8_t *); template uint16_t *rawmemchr(uint16_t *); template uint32_t *rawmemchr(uint32_t *); template int8_t *rawmemchr(int8_t *); template int16_t *rawmemchr(int16_t *); template int32_t *rawmemchr(int32_t *); /* { dg-final { scan-tree-dump-times "generated rawmemchrqi" 2 "ldist" } } */ /* { dg-final { scan-tree-dump-times "generated rawmemchrhi" 2 "ldist" } } */ /* { dg-final { scan-tree-dump-times "generated rawmemchrsi" 2 "ldist" } } */