diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-26 19:24:09 +0000 |
commit | f0c55418e2b09eaab37c820d3756cc1b4584d084 (patch) | |
tree | 9263bf60f263bb5a7aaa4d2c1be43e5fc4d942e0 /test/CodeGen | |
parent | 583e75cce441388bc562fa225d23499261a0091e (diff) |
Notes
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/asan-globals-gc.cpp | 7 | ||||
-rw-r--r-- | test/CodeGen/catch-undef-behavior.c | 8 | ||||
-rw-r--r-- | test/CodeGen/pgo-sample-thinlto-summary.c | 4 | ||||
-rw-r--r-- | test/CodeGen/sanitize-recover.c | 10 | ||||
-rw-r--r-- | test/CodeGen/split-debug-filename.c | 5 |
5 files changed, 16 insertions, 18 deletions
diff --git a/test/CodeGen/asan-globals-gc.cpp b/test/CodeGen/asan-globals-gc.cpp new file mode 100644 index 0000000000000..6d64f41dda8dd --- /dev/null +++ b/test/CodeGen/asan-globals-gc.cpp @@ -0,0 +1,7 @@ +// RUN: %clang_cc1 -fsanitize=address -emit-llvm -o - -triple x86_64-windows-msvc %s | FileCheck %s --check-prefix=WITH-GC +// RUN: %clang_cc1 -fsanitize=address -emit-llvm -o - -triple x86_64-windows-msvc -fdata-sections %s | FileCheck %s --check-prefix=WITH-GC + +int global; + +// WITH-GC-NOT: call void @__asan_register_globals +// WITHOUT-GC: call void @__asan_register_globals diff --git a/test/CodeGen/catch-undef-behavior.c b/test/CodeGen/catch-undef-behavior.c index c5f3a79429a01..e67f0a1f8eec1 100644 --- a/test/CodeGen/catch-undef-behavior.c +++ b/test/CodeGen/catch-undef-behavior.c @@ -36,13 +36,7 @@ void foo() { // CHECK-COMMON: %[[I8PTR:.*]] = bitcast i32* %[[PTR:.*]] to i8* // CHECK-COMMON-NEXT: %[[SIZE:.*]] = call i64 @llvm.objectsize.i64.p0i8(i8* %[[I8PTR]], i1 false, i1 false) - // CHECK-COMMON-NEXT: %[[CHECK0:.*]] = icmp uge i64 %[[SIZE]], 4 - - // CHECK-COMMON: %[[PTRTOINT:.*]] = ptrtoint {{.*}}* %[[PTR]] to i64 - // CHECK-COMMON-NEXT: %[[MISALIGN:.*]] = and i64 %[[PTRTOINT]], 3 - // CHECK-COMMON-NEXT: %[[CHECK1:.*]] = icmp eq i64 %[[MISALIGN]], 0 - - // CHECK-COMMON: %[[OK:.*]] = and i1 %[[CHECK0]], %[[CHECK1]] + // CHECK-COMMON-NEXT: %[[OK:.*]] = icmp uge i64 %[[SIZE]], 4 // CHECK-UBSAN: br i1 %[[OK]], {{.*}} !prof ![[WEIGHT_MD:.*]], !nosanitize // CHECK-TRAP: br i1 %[[OK]], {{.*}} diff --git a/test/CodeGen/pgo-sample-thinlto-summary.c b/test/CodeGen/pgo-sample-thinlto-summary.c index a284af3c80877..7782aeb76616d 100644 --- a/test/CodeGen/pgo-sample-thinlto-summary.c +++ b/test/CodeGen/pgo-sample-thinlto-summary.c @@ -32,10 +32,10 @@ void unroll() { baz(i); } -// Checks if icp is invoked by normal compile, but not thinlto compile. +// Check that icp is not invoked (both -O2 and ThinLTO). // O2-LABEL: define void @icp // THINLTO-LABEL: define void @icp -// O2: if.true.direct_targ +// O2-NOT: if.true.direct_targ // ThinLTO-NOT: if.true.direct_targ void icp(void (*p)()) { p(); diff --git a/test/CodeGen/sanitize-recover.c b/test/CodeGen/sanitize-recover.c index 99eff8518ce84..d714d58c7f26c 100644 --- a/test/CodeGen/sanitize-recover.c +++ b/test/CodeGen/sanitize-recover.c @@ -22,15 +22,7 @@ void foo() { // PARTIAL: %[[SIZE:.*]] = call i64 @llvm.objectsize.i64.p0i8(i8* {{.*}}, i1 false, i1 false) // PARTIAL-NEXT: %[[CHECK0:.*]] = icmp uge i64 %[[SIZE]], 4 - // PARTIAL: %[[MISALIGN:.*]] = and i64 {{.*}}, 3 - // PARTIAL-NEXT: %[[CHECK1:.*]] = icmp eq i64 %[[MISALIGN]], 0 + // PARTIAL: br i1 %[[CHECK0]], {{.*}} !nosanitize - // PARTIAL: %[[CHECK01:.*]] = and i1 %[[CHECK1]], %[[CHECK0]] - - // PARTIAL: br i1 %[[CHECK01]], {{.*}} !nosanitize - // PARTIAL: br i1 %[[CHECK1]], {{.*}} !nosanitize - - // PARTIAL: call void @__ubsan_handle_type_mismatch_v1_abort( - // PARTIAL-NEXT: unreachable // PARTIAL: call void @__ubsan_handle_type_mismatch_v1( } diff --git a/test/CodeGen/split-debug-filename.c b/test/CodeGen/split-debug-filename.c index 43daeada96ab0..9ca7b0f3287a9 100644 --- a/test/CodeGen/split-debug-filename.c +++ b/test/CodeGen/split-debug-filename.c @@ -1,7 +1,12 @@ // RUN: %clang_cc1 -debug-info-kind=limited -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -debug-info-kind=limited -enable-split-dwarf -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck --check-prefix=VANILLA %s int main (void) { return 0; } // Testing to ensure that the dwo name gets output into the compile unit. // CHECK: !DICompileUnit({{.*}}, splitDebugFilename: "foo.dwo" + +// Testing to ensure that the dwo name is not output into the compile unit if +// it's for vanilla split-dwarf rather than split-dwarf for implicit modules. +// VANILLA-NOT: splitDebugFilename |