diff options
Diffstat (limited to 'test/CodeGen/nobuiltin.c')
-rw-r--r-- | test/CodeGen/nobuiltin.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/CodeGen/nobuiltin.c b/test/CodeGen/nobuiltin.c index 7cc8164c6f126..f80c3c332ab4b 100644 --- a/test/CodeGen/nobuiltin.c +++ b/test/CodeGen/nobuiltin.c @@ -1,17 +1,21 @@ -// RUN: %clang_cc1 -fno-builtin -O1 -S -o - %s | FileCheck %s -// RUN: %clang_cc1 -fno-builtin-memset -O1 -S -o - %s | FileCheck -check-prefix=MEMSET %s +// REQUIRES: x86-registered-target + +// RUN: %clang_cc1 -triple x86_64-linux-gnu -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=MEMSET %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin -O1 -S -o - %s | FileCheck -check-prefix=NOSTRCPY -check-prefix=NOMEMSET %s +// RUN: %clang_cc1 -triple x86_64-linux-gnu -fno-builtin-memset -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=NOMEMSET %s void PR13497() { char content[2]; // make sure we don't optimize this call to strcpy() - // CHECK: __strcpy_chk + // STRCPY-NOT: __strcpy_chk + // NOSTRCPY: __strcpy_chk __builtin___strcpy_chk(content, "", 1); } void PR4941(char *s) { // Make sure we don't optimize this loop to a memset(). - // MEMSET-LABEL: PR4941: - // MEMSET-NOT: memset + // NOMEMSET-NOT: memset + // MEMSET: memset for (unsigned i = 0; i < 8192; ++i) s[i] = 0; } |