From: Peter Collingbourne Date: Fri, 16 Sep 2016 22:05:53 +0000 (+0000) Subject: CodeGen: Add more checks to nobuiltin.c test, add a negative test. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8a76d47746b94c266422a8543b134b0f03f1ea71;p=clang CodeGen: Add more checks to nobuiltin.c test, add a negative test. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281785 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/nobuiltin.c b/test/CodeGen/nobuiltin.c index 7cc8164c6f..fa71d60cc7 100644 --- a/test/CodeGen/nobuiltin.c +++ b/test/CodeGen/nobuiltin.c @@ -1,17 +1,19 @@ -// 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 +// RUN: %clang_cc1 -O1 -S -o - %s | FileCheck -check-prefix=STRCPY -check-prefix=MEMSET %s +// RUN: %clang_cc1 -fno-builtin -O1 -S -o - %s | FileCheck -check-prefix=NOSTRCPY -check-prefix=NOMEMSET %s +// RUN: %clang_cc1 -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; }