diff options
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 |
