1 // REQUIRES: x86-registered-target
3 // RUN: %clang_cc1 -triple x86_64-linux-gnu -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=MEMSET %s
4 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin -O1 -S -o - %s | FileCheck -check-prefix=NOSTRCPY -check-prefix=NOMEMSET %s
5 // RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin-memset -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=NOMEMSET %s
9 // make sure we don't optimize this call to strcpy()
10 // STRCPY-NOT: __strcpy_chk
11 // NOSTRCPY: __strcpy_chk
12 __builtin___strcpy_chk(content
, "", 1);
15 void PR4941(char *s
) {
16 // Make sure we don't optimize this loop to a memset().
17 // NOMEMSET-NOT: memset
19 for (unsigned i
= 0; i
< 8192; ++i
)