gcc/testsuite/gcc.target/powerpc/block-cmp-2.c
raw| 1 | /* { dg-do compile } */ |
| 2 | /* { dg-require-effective-target opt_mstrict_align } */ |
| 3 | /* { dg-options "-O2 -mstrict-align" } */ |
| 4 | /* { dg-final { scan-assembler-times {\mb[l]? memcmp\M} 1 } } */ |
| 5 | |
| 6 | /* Test that it calls library for block memory compare when strict-align |
| 7 | is set. The flag causes rs6000_slow_unaligned_access returns true. */ |
| 8 | |
| 9 | int foo (const char* s1, const char* s2) |
| 10 | { |
| 11 | return __builtin_memcmp (s1, s2, 20); |
| 12 | } |