11b4137a7SPeter Collingbourne; RUN: opt -module-summary %s -o %t.o
21b4137a7SPeter Collingbourne; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s
308d5b4efSTeresa Johnson; RUN: llvm-dis -o - %t.o | FileCheck %s --check-prefix=DIS
463ee0e73STeresa Johnson; Round trip it through llvm-as
563ee0e73STeresa Johnson; RUN: llvm-dis -o - %t.o | llvm-as -o - | llvm-dis -o - | FileCheck %s --check-prefix=DIS
61b4137a7SPeter Collingbourne; RUN: llvm-lto -thinlto -o %t2 %t.o
71b4137a7SPeter Collingbourne; RUN: llvm-bcanalyzer -dump %t2.thinlto.bc | FileCheck --check-prefix=COMBINED %s
808d5b4efSTeresa Johnson; RUN: llvm-dis -o - %t2.thinlto.bc | FileCheck %s --check-prefix=COMBINED-DIS
963ee0e73STeresa Johnson; Round trip it through llvm-as
1063ee0e73STeresa Johnson; RUN: llvm-dis -o - %t2.thinlto.bc | llvm-as -o - | llvm-dis -o - | FileCheck %s --check-prefix=COMBINED-DIS
111b4137a7SPeter Collingbourne
121b4137a7SPeter Collingbourne; COMBINED: <TYPE_TESTS op0=-2012135647395072713/>
131b4137a7SPeter Collingbourne; COMBINED: <TYPE_TESTS op0=6699318081062747564 op1=-2012135647395072713/>
141b4137a7SPeter Collingbourne; COMBINED: <TYPE_TESTS op0=6699318081062747564/>
151b4137a7SPeter Collingbourne
161b4137a7SPeter Collingbourne; CHECK: <TYPE_TESTS op0=6699318081062747564/>
171b4137a7SPeter Collingbournedefine i1 @f() {
181b4137a7SPeter Collingbourne  %p = call i1 @llvm.type.test(i8* null, metadata !"foo")
191b4137a7SPeter Collingbourne  ret i1 %p
201b4137a7SPeter Collingbourne}
211b4137a7SPeter Collingbourne
221b4137a7SPeter Collingbourne; CHECK: <TYPE_TESTS op0=6699318081062747564 op1=-2012135647395072713/>
231b4137a7SPeter Collingbournedefine i1 @g() {
241b4137a7SPeter Collingbourne  %p = call i1 @llvm.type.test(i8* null, metadata !"foo")
251b4137a7SPeter Collingbourne  %q = call i1 @llvm.type.test(i8* null, metadata !"bar")
261b4137a7SPeter Collingbourne  %pq = and i1 %p, %q
271b4137a7SPeter Collingbourne  ret i1 %pq
281b4137a7SPeter Collingbourne}
291b4137a7SPeter Collingbourne
301b4137a7SPeter Collingbourne; CHECK: <TYPE_TESTS op0=-2012135647395072713/>
311b4137a7SPeter Collingbournedefine i1 @h() {
321b4137a7SPeter Collingbourne  %p = call i1 @llvm.type.test(i8* null, metadata !"bar")
331b4137a7SPeter Collingbourne  ret i1 %p
341b4137a7SPeter Collingbourne}
351b4137a7SPeter Collingbourne
361b4137a7SPeter Collingbournedeclare i1 @llvm.type.test(i8*, metadata) nounwind readnone
3708d5b4efSTeresa Johnson
3863ee0e73STeresa Johnson; DIS: ^0 = module: (path: "{{.*}}", hash: (0, 0, 0, 0, 0))
3908d5b4efSTeresa Johnson; DIS: ^1 = gv: (name: "llvm.type.test") ; guid = 608142985856744218
40*54fb3ca9SFangrui Song; DIS: ^2 = gv: (name: "h", summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), insts: 2, typeIdInfo: (typeTests: (16434608426314478903))))) ; guid = 8124147457056772133
41*54fb3ca9SFangrui Song; DIS: ^3 = gv: (name: "g", summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), insts: 4, typeIdInfo: (typeTests: (6699318081062747564, 16434608426314478903))))) ; guid = 13146401226427987378
42*54fb3ca9SFangrui Song; DIS: ^4 = gv: (name: "f", summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), insts: 2, typeIdInfo: (typeTests: (6699318081062747564))))) ; guid = 14740650423002898831
4308d5b4efSTeresa Johnson
44fb89e7a9STeresa Johnson; COMBINED-DIS: ^0 = module: (path: "{{.*}}thinlto-type-tests.ll.tmp.o", hash: (0, 0, 0, 0, 0))
45*54fb3ca9SFangrui Song; COMBINED-DIS: ^1 = gv: (guid: 8124147457056772133, summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), insts: 2, typeIdInfo: (typeTests: (16434608426314478903)))))
46*54fb3ca9SFangrui Song; COMBINED-DIS: ^2 = gv: (guid: 13146401226427987378, summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), insts: 4, typeIdInfo: (typeTests: (6699318081062747564, 16434608426314478903)))))
47*54fb3ca9SFangrui Song; COMBINED-DIS: ^3 = gv: (guid: 14740650423002898831, summaries: (function: (module: ^0, flags: (linkage: external, visibility: default, notEligibleToImport: 0, live: 0, dsoLocal: 0, canAutoHide: 0), insts: 2, typeIdInfo: (typeTests: (6699318081062747564)))))
48