diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2017-05-29 05:38:20 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2017-05-29 05:38:20 +0000 |
commit | 7a4550308bb4475544102bf06dc6b64297aaa014 (patch) | |
tree | 194bba2fe8391f1f4c47ad93402df7b4957e2b89 /test/CodeGen | |
parent | 384ca6f633ff738d341efbde857d66dbb10e7ab1 (diff) | |
download | clang-7a4550308bb4475544102bf06dc6b64297aaa014.tar.gz |
IRGen: Add optnone attribute on function during O0
Amongst other, this will help LTO to correctly handle/honor files
compiled with O0, helping debugging failures.
It also seems in line with how we handle other options, like how
-fnoinline adds the appropriate attribute as well.
Differential Revision: https://reviews.llvm.org/D28404
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@304127 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
40 files changed, 52 insertions, 50 deletions
diff --git a/test/CodeGen/aarch64-neon-2velem.c b/test/CodeGen/aarch64-neon-2velem.c index 2937d7e5b1..3867b01afb 100644 --- a/test/CodeGen/aarch64-neon-2velem.c +++ b/test/CodeGen/aarch64-neon-2velem.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-3v.c b/test/CodeGen/aarch64-neon-3v.c index 3581f780ff..de38e95c44 100644 --- a/test/CodeGen/aarch64-neon-3v.c +++ b/test/CodeGen/aarch64-neon-3v.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-across.c b/test/CodeGen/aarch64-neon-across.c index 6d7a0d5bcd..767825461b 100644 --- a/test/CodeGen/aarch64-neon-across.c +++ b/test/CodeGen/aarch64-neon-across.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-extract.c b/test/CodeGen/aarch64-neon-extract.c index c84c861b87..6b62d9f1cf 100644 --- a/test/CodeGen/aarch64-neon-extract.c +++ b/test/CodeGen/aarch64-neon-extract.c @@ -1,6 +1,6 @@ // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-fcvt-intrinsics.c b/test/CodeGen/aarch64-neon-fcvt-intrinsics.c index f2c238ebeb..929a6501df 100644 --- a/test/CodeGen/aarch64-neon-fcvt-intrinsics.c +++ b/test/CodeGen/aarch64-neon-fcvt-intrinsics.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-fma.c b/test/CodeGen/aarch64-neon-fma.c index 6ada533c66..3a84834e11 100644 --- a/test/CodeGen/aarch64-neon-fma.c +++ b/test/CodeGen/aarch64-neon-fma.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -S -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-intrinsics.c b/test/CodeGen/aarch64-neon-intrinsics.c index 935e762d8c..bcb680c4b5 100644 --- a/test/CodeGen/aarch64-neon-intrinsics.c +++ b/test/CodeGen/aarch64-neon-intrinsics.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -fallow-half-arguments-and-returns -S -emit-llvm -o - %s \ +// RUN: -fallow-half-arguments-and-returns -S -disable-O0-optnone -emit-llvm -o - %s \ // RUN: | opt -S -mem2reg \ // RUN: | FileCheck %s diff --git a/test/CodeGen/aarch64-neon-ldst-one.c b/test/CodeGen/aarch64-neon-ldst-one.c index 25bd797b92..9bd9ab1cb6 100644 --- a/test/CodeGen/aarch64-neon-ldst-one.c +++ b/test/CodeGen/aarch64-neon-ldst-one.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -fallow-half-arguments-and-returns -emit-llvm -o - %s \ +// RUN: -disable-O0-optnone -fallow-half-arguments-and-returns -emit-llvm -o - %s \ // RUN: | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/aarch64-neon-misc.c b/test/CodeGen/aarch64-neon-misc.c index 28fc1fe1e3..0772d4fc67 100644 --- a/test/CodeGen/aarch64-neon-misc.c +++ b/test/CodeGen/aarch64-neon-misc.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -fallow-half-arguments-and-returns -emit-llvm -o - %s \ +// RUN: -disable-O0-optnone -fallow-half-arguments-and-returns -emit-llvm -o - %s \ // RUN: | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-perm.c b/test/CodeGen/aarch64-neon-perm.c index 5b8a99c993..471017a99b 100644 --- a/test/CodeGen/aarch64-neon-perm.c +++ b/test/CodeGen/aarch64-neon-perm.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types #include <arm_neon.h> diff --git a/test/CodeGen/aarch64-neon-scalar-copy.c b/test/CodeGen/aarch64-neon-scalar-copy.c index 90fceb44ed..28cff5fbf3 100644 --- a/test/CodeGen/aarch64-neon-scalar-copy.c +++ b/test/CodeGen/aarch64-neon-scalar-copy.c @@ -1,6 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s - +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c b/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c index 01296c9359..e85b918d5a 100644 --- a/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c +++ b/test/CodeGen/aarch64-neon-scalar-x-indexed-elem.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -target-cpu cyclone \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-shifts.c b/test/CodeGen/aarch64-neon-shifts.c index 66449f7fef..e9a679bc69 100644 --- a/test/CodeGen/aarch64-neon-shifts.c +++ b/test/CodeGen/aarch64-neon-shifts.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -ffp-contract=fast -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -ffp-contract=fast -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/aarch64-neon-tbl.c b/test/CodeGen/aarch64-neon-tbl.c index 0cc66453ac..28881830bf 100644 --- a/test/CodeGen/aarch64-neon-tbl.c +++ b/test/CodeGen/aarch64-neon-tbl.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-vcombine.c b/test/CodeGen/aarch64-neon-vcombine.c index 482463cacf..f27017404d 100644 --- a/test/CodeGen/aarch64-neon-vcombine.c +++ b/test/CodeGen/aarch64-neon-vcombine.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -fallow-half-arguments-and-returns -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon -fallow-half-arguments-and-returns -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-vget-hilo.c b/test/CodeGen/aarch64-neon-vget-hilo.c index f66bac6a6a..cc4d46dd69 100644 --- a/test/CodeGen/aarch64-neon-vget-hilo.c +++ b/test/CodeGen/aarch64-neon-vget-hilo.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -fallow-half-arguments-and-returns -emit-llvm -o - %s \ +// RUN: -fallow-half-arguments-and-returns -disable-O0-optnone -emit-llvm -o - %s \ // RUN: | opt -S -mem2reg | FileCheck %s // Test new aarch64 intrinsics and types diff --git a/test/CodeGen/aarch64-neon-vget.c b/test/CodeGen/aarch64-neon-vget.c index 87afcee9c8..ac7bc2d68a 100644 --- a/test/CodeGen/aarch64-neon-vget.c +++ b/test/CodeGen/aarch64-neon-vget.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-apple-darwin -target-feature +neon \ -// RUN: -fallow-half-arguments-and-returns -emit-llvm -o - %s \ +// RUN: -fallow-half-arguments-and-returns -disable-O0-optnone -emit-llvm -o - %s \ // RUN: | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/aarch64-poly128.c b/test/CodeGen/aarch64-poly128.c index 01c509035f..d33d936717 100644 --- a/test/CodeGen/aarch64-poly128.c +++ b/test/CodeGen/aarch64-poly128.c @@ -1,6 +1,6 @@ // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -ffp-contract=fast -emit-llvm -o - %s | opt -S -mem2reg \ +// RUN: -disable-O0-optnone -ffp-contract=fast -emit-llvm -o - %s | opt -S -mem2reg \ // RUN: | FileCheck %s // Test new aarch64 intrinsics with poly128 diff --git a/test/CodeGen/aarch64-poly64.c b/test/CodeGen/aarch64-poly64.c index eadeda6404..3fb8048fb3 100644 --- a/test/CodeGen/aarch64-poly64.c +++ b/test/CodeGen/aarch64-poly64.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple arm64-none-linux-gnu -target-feature +neon \ -// RUN: -ffp-contract=fast -emit-llvm -o - %s | opt -S -mem2reg \ +// RUN: -ffp-contract=fast -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg \ // RUN: | FileCheck %s // Test new aarch64 intrinsics with poly64 diff --git a/test/CodeGen/address-safety-attr-kasan.cpp b/test/CodeGen/address-safety-attr-kasan.cpp index 4d8333d2ff..603134db69 100644 --- a/test/CodeGen/address-safety-attr-kasan.cpp +++ b/test/CodeGen/address-safety-attr-kasan.cpp @@ -1,9 +1,9 @@ // Make sure the sanitize_address attribute is emitted when using both ASan and KASan. // Also document that __attribute__((no_sanitize_address)) doesn't disable KASan instrumentation. -/// RUN: %clang_cc1 -triple i386-unknown-linux -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NOASAN %s -/// RUN: %clang_cc1 -triple i386-unknown-linux -fsanitize=address -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-ASAN %s -/// RUN: %clang_cc1 -triple i386-unknown-linux -fsanitize=kernel-address -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-KASAN %s +/// RUN: %clang_cc1 -triple i386-unknown-linux -disable-O0-optnone -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-NOASAN %s +/// RUN: %clang_cc1 -triple i386-unknown-linux -fsanitize=address -disable-O0-optnone -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-ASAN %s +/// RUN: %clang_cc1 -triple i386-unknown-linux -fsanitize=kernel-address -disable-O0-optnone -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-KASAN %s int HasSanitizeAddress() { return 1; diff --git a/test/CodeGen/address-safety-attr.cpp b/test/CodeGen/address-safety-attr.cpp index 60faeddbd4..9862240929 100644 --- a/test/CodeGen/address-safety-attr.cpp +++ b/test/CodeGen/address-safety-attr.cpp @@ -3,16 +3,16 @@ int DefinedInDifferentFile(int *a); // RUN: echo "struct S { S(){} ~S(){} };" >> %t.extra-source.cpp // RUN: echo "S glob_array[5];" >> %t.extra-source.cpp -// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -emit-llvm -o - %s -include %t.extra-source.cpp | FileCheck -check-prefix=WITHOUT %s -// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address | FileCheck -check-prefix=ASAN %s +// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp | FileCheck -check-prefix=WITHOUT %s +// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address | FileCheck -check-prefix=ASAN %s // RUN: echo "fun:*BlacklistedFunction*" > %t.func.blacklist -// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.func.blacklist | FileCheck -check-prefix=BLFUNC %s +// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.func.blacklist | FileCheck -check-prefix=BLFUNC %s // The blacklist file uses regexps, so escape backslashes, which are common in // Windows paths. // RUN: echo "src:%s" | sed -e 's/\\/\\\\/g' > %t.file.blacklist -// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.file.blacklist | FileCheck -check-prefix=BLFILE %s +// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin -disable-O0-optnone -emit-llvm -o - %s -include %t.extra-source.cpp -fsanitize=address -fsanitize-blacklist=%t.file.blacklist | FileCheck -check-prefix=BLFILE %s // The sanitize_address attribute should be attached to functions // when AddressSanitizer is enabled, unless no_sanitize_address attribute diff --git a/test/CodeGen/arm-crc32.c b/test/CodeGen/arm-crc32.c index 8a70d8c78a..c9aa549cbb 100644 --- a/test/CodeGen/arm-crc32.c +++ b/test/CodeGen/arm-crc32.c @@ -1,5 +1,5 @@ // RUN: %clang_cc1 -triple armv8-none-linux-gnueabi \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s int crc32b(int a, char b) { diff --git a/test/CodeGen/arm-neon-directed-rounding.c b/test/CodeGen/arm-neon-directed-rounding.c index 7471b1c230..b06808a77c 100644 --- a/test/CodeGen/arm-neon-directed-rounding.c +++ b/test/CodeGen/arm-neon-directed-rounding.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/arm-neon-fma.c b/test/CodeGen/arm-neon-fma.c index 9311f6be68..b5184c195e 100644 --- a/test/CodeGen/arm-neon-fma.c +++ b/test/CodeGen/arm-neon-fma.c @@ -3,7 +3,7 @@ // RUN: -target-cpu cortex-a7 \ // RUN: -mfloat-abi hard \ // RUN: -ffreestanding \ -// RUN: -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/arm-neon-numeric-maxmin.c b/test/CodeGen/arm-neon-numeric-maxmin.c index 38f020a756..d4f5674cd9 100644 --- a/test/CodeGen/arm-neon-numeric-maxmin.c +++ b/test/CodeGen/arm-neon-numeric-maxmin.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/arm-neon-shifts.c b/test/CodeGen/arm-neon-shifts.c index ebaa97fe38..ec059738ec 100644 --- a/test/CodeGen/arm-neon-shifts.c +++ b/test/CodeGen/arm-neon-shifts.c @@ -1,5 +1,6 @@ // REQUIRES: arm-registered-target // RUN: %clang_cc1 -triple thumbv7-apple-darwin \ +// RUN: -disable-O0-optnone \ // RUN: -target-cpu cortex-a8 \ // RUN: -ffreestanding \ // RUN: -emit-llvm -w -o - %s | opt -S -mem2reg | FileCheck %s diff --git a/test/CodeGen/arm-neon-vcvtX.c b/test/CodeGen/arm-neon-vcvtX.c index 4ea8fa874e..43d48a0a4f 100644 --- a/test/CodeGen/arm-neon-vcvtX.c +++ b/test/CodeGen/arm-neon-vcvtX.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple thumbv8-linux-gnueabihf -target-cpu cortex-a57 -ffreestanding -disable-O0-optnone -emit-llvm %s -o - | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/arm-neon-vget.c b/test/CodeGen/arm-neon-vget.c index 3bf8905f39..841cf0396d 100644 --- a/test/CodeGen/arm-neon-vget.c +++ b/test/CodeGen/arm-neon-vget.c @@ -4,7 +4,7 @@ // RUN: -mfloat-abi soft \ // RUN: -target-feature +soft-float-abi \ // RUN: -ffreestanding \ -// RUN: -emit-llvm -w -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -emit-llvm -w -o - %s | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/arm64-crc32.c b/test/CodeGen/arm64-crc32.c index efb51ed407..2d913fb123 100644 --- a/test/CodeGen/arm64-crc32.c +++ b/test/CodeGen/arm64-crc32.c @@ -1,6 +1,6 @@ // REQUIRES: aarch64-registered-target // RUN: %clang_cc1 -triple arm64-none-linux-gnu \ -// RUN: -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: -disable-O0-optnone -S -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s int crc32b(int a, char b) { diff --git a/test/CodeGen/arm64-lanes.c b/test/CodeGen/arm64-lanes.c index ea47bae69f..fde5f848b9 100644 --- a/test/CodeGen/arm64-lanes.c +++ b/test/CodeGen/arm64-lanes.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s -// RUN: %clang_cc1 -triple aarch64_be-linux-gnu -target-feature +neon -ffreestanding -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s --check-prefix CHECK-BE +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple aarch64_be-linux-gnu -target-feature +neon -ffreestanding -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s --check-prefix CHECK-BE #include <arm_neon.h> diff --git a/test/CodeGen/arm64_vcopy.c b/test/CodeGen/arm64_vcopy.c index 4c0143016f..fc2ad3746b 100644 --- a/test/CodeGen/arm64_vcopy.c +++ b/test/CodeGen/arm64_vcopy.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -emit-llvm %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -S -o - -disable-O0-optnone -emit-llvm %s | opt -S -mem2reg | FileCheck %s // Test ARM64 SIMD copy vector element to vector element: vcopyq_lane* diff --git a/test/CodeGen/arm64_vdupq_n_f64.c b/test/CodeGen/arm64_vdupq_n_f64.c index 58cc7f020e..e9e814e92a 100644 --- a/test/CodeGen/arm64_vdupq_n_f64.c +++ b/test/CodeGen/arm64_vdupq_n_f64.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -fallow-half-arguments-and-returns -S -o - -emit-llvm %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-apple-ios7 -target-feature +neon -ffreestanding -fallow-half-arguments-and-returns -S -o - -disable-O0-optnone -emit-llvm %s | opt -S -mem2reg | FileCheck %s #include <arm_neon.h> diff --git a/test/CodeGen/attr-coldhot.c b/test/CodeGen/attr-coldhot.c index ec54edde9d..24e1feb77b 100644 --- a/test/CodeGen/attr-coldhot.c +++ b/test/CodeGen/attr-coldhot.c @@ -1,4 +1,5 @@ -// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s +// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s -check-prefixes=CHECK,O0 +// RUN: %clang_cc1 -emit-llvm %s -o - -O1 -disable-llvm-passes | FileCheck %s -check-prefixes=CHECK,O1 int test1() __attribute__((__cold__)) { return 42; @@ -8,4 +9,5 @@ int test1() __attribute__((__cold__)) { // CHECK: ret } -// CHECK: attributes [[ATTR]] = { {{.*}}cold{{.*}}optsize{{.*}} } +// O0: attributes [[ATTR]] = { {{.*}}cold{{.*}}optnone{{.*}} } +// O1: attributes [[ATTR]] = { {{.*}}cold{{.*}}optsize{{.*}} } diff --git a/test/CodeGen/attr-naked.c b/test/CodeGen/attr-naked.c index 270fc7959f..34e745b374 100644 --- a/test/CodeGen/attr-naked.c +++ b/test/CodeGen/attr-naked.c @@ -4,14 +4,14 @@ void t1() __attribute__((naked)); // Basic functionality check // (Note that naked needs to imply noinline to work properly.) -// CHECK: define void @t1() [[NAKED:#[0-9]+]] { +// CHECK: define void @t1() [[NAKED_OPTNONE:#[0-9]+]] { void t1() { } // Make sure this doesn't explode in the verifier. // (It doesn't really make sense, but it isn't invalid.) -// CHECK: define void @t2() [[NAKED]] { +// CHECK: define void @t2() [[NAKED:#[0-9]+]] { __attribute((naked, always_inline)) void t2() { } @@ -23,4 +23,5 @@ __attribute((naked)) void t3(int x) { // CHECK: unreachable } +// CHECK: attributes [[NAKED_OPTNONE]] = { naked noinline nounwind optnone{{.*}} } // CHECK: attributes [[NAKED]] = { naked noinline nounwind{{.*}} } diff --git a/test/CodeGen/builtins-arm-exclusive.c b/test/CodeGen/builtins-arm-exclusive.c index b0bc2b82d3..56d7798a5e 100644 --- a/test/CodeGen/builtins-arm-exclusive.c +++ b/test/CodeGen/builtins-arm-exclusive.c @@ -1,6 +1,5 @@ -// RUN: %clang_cc1 -Wall -Werror -triple thumbv8-linux-gnueabi -fno-signed-char -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s -// RUN: %clang_cc1 -Wall -Werror -triple arm64-apple-ios7.0 -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s --check-prefix=CHECK-ARM64 - +// RUN: %clang_cc1 -Wall -Werror -triple thumbv8-linux-gnueabi -fno-signed-char -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -Wall -Werror -triple arm64-apple-ios7.0 -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s --check-prefix=CHECK-ARM64 struct Simple { char a, b; diff --git a/test/CodeGen/builtins-arm.c b/test/CodeGen/builtins-arm.c index 0dc4c7dd77..e04349f1a3 100644 --- a/test/CodeGen/builtins-arm.c +++ b/test/CodeGen/builtins-arm.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -Wall -Werror -triple thumbv7-eabi -target-cpu cortex-a8 -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -Wall -Werror -triple thumbv7-eabi -target-cpu cortex-a8 -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s #include <stdint.h> diff --git a/test/CodeGen/builtins-arm64.c b/test/CodeGen/builtins-arm64.c index dc5fb6f31c..7027a6e220 100644 --- a/test/CodeGen/builtins-arm64.c +++ b/test/CodeGen/builtins-arm64.c @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -triple arm64-unknown-linux -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s +// RUN: %clang_cc1 -triple arm64-unknown-linux -disable-O0-optnone -emit-llvm -o - %s | opt -S -mem2reg | FileCheck %s void f0(void *a, void *b) { __clear_cache(a,b); diff --git a/test/CodeGen/noduplicate-cxx11-test.cpp b/test/CodeGen/noduplicate-cxx11-test.cpp index 01278632bf..bcec05f72a 100644 --- a/test/CodeGen/noduplicate-cxx11-test.cpp +++ b/test/CodeGen/noduplicate-cxx11-test.cpp @@ -17,4 +17,4 @@ int main() { } -// CHECK: attributes [[NI]] = { noduplicate nounwind{{.*}} } +// CHECK: attributes [[NI]] = { noduplicate {{.*}}nounwind{{.*}} } diff --git a/test/CodeGen/pragma-weak.c b/test/CodeGen/pragma-weak.c index 36abca5de3..d1f7ab6c3e 100644 --- a/test/CodeGen/pragma-weak.c +++ b/test/CodeGen/pragma-weak.c @@ -189,4 +189,4 @@ void zzz(void){} int correct_linkage; // CHECK: attributes [[NI]] = { noinline nounwind{{.*}} } -// CHECK: attributes [[RN]] = { noinline nounwind readnone{{.*}} } +// CHECK: attributes [[RN]] = { noinline nounwind optnone readnone{{.*}} } diff --git a/test/CodeGen/unwind-attr.c b/test/CodeGen/unwind-attr.c index 2065653e0d..9979235003 100644 --- a/test/CodeGen/unwind-attr.c +++ b/test/CodeGen/unwind-attr.c @@ -23,7 +23,7 @@ __attribute__((weak)) int test2(void) { return 0; } -// CHECK: attributes [[TF]] = { noinline "{{.*}} } +// CHECK: attributes [[TF]] = { noinline optnone "{{.*}} } // CHECK: attributes [[NUW]] = { noinline nounwind{{.*}} } // CHECK-NOEXC: attributes [[NUW]] = { noinline nounwind{{.*}} } |