diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-01-02 19:17:04 +0000 |
| commit | b915e9e0fc85ba6f398b3fab0db6a81a8913af94 (patch) | |
| tree | 98b8f811c7aff2547cab8642daf372d6c59502fb /test/Bitcode/thinlto-type-tests.ll | |
| parent | 6421cca32f69ac849537a3cff78c352195e99f1b (diff) | |
Notes
Diffstat (limited to 'test/Bitcode/thinlto-type-tests.ll')
| -rw-r--r-- | test/Bitcode/thinlto-type-tests.ll | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/test/Bitcode/thinlto-type-tests.ll b/test/Bitcode/thinlto-type-tests.ll new file mode 100644 index 000000000000..4281fbba196f --- /dev/null +++ b/test/Bitcode/thinlto-type-tests.ll @@ -0,0 +1,30 @@ +; RUN: opt -module-summary %s -o %t.o +; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s +; RUN: llvm-lto -thinlto -o %t2 %t.o +; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck --check-prefix=COMBINED %s + +; COMBINED: <TYPE_TESTS op0=-2012135647395072713/> +; COMBINED: <TYPE_TESTS op0=6699318081062747564 op1=-2012135647395072713/> +; COMBINED: <TYPE_TESTS op0=6699318081062747564/> + +; CHECK: <TYPE_TESTS op0=6699318081062747564/> +define i1 @f() { + %p = call i1 @llvm.type.test(i8* null, metadata !"foo") + ret i1 %p +} + +; CHECK: <TYPE_TESTS op0=6699318081062747564 op1=-2012135647395072713/> +define i1 @g() { + %p = call i1 @llvm.type.test(i8* null, metadata !"foo") + %q = call i1 @llvm.type.test(i8* null, metadata !"bar") + %pq = and i1 %p, %q + ret i1 %pq +} + +; CHECK: <TYPE_TESTS op0=-2012135647395072713/> +define i1 @h() { + %p = call i1 @llvm.type.test(i8* null, metadata !"bar") + ret i1 %p +} + +declare i1 @llvm.type.test(i8*, metadata) nounwind readnone |
