]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/Transforms/LowerTypeTests/import-unsat.ll
Vendor import of llvm trunk r291274:
[FreeBSD/FreeBSD.git] / test / Transforms / LowerTypeTests / import-unsat.ll
1 ; Test that we correctly import an unsat resolution for type identifier "typeid1".
2 ; RUN: opt -S -lowertypetests -lowertypetests-summary-action=import -lowertypetests-read-summary=%S/Inputs/import-unsat.yaml -lowertypetests-write-summary=%t < %s | FileCheck %s
3 ; RUN: FileCheck --check-prefix=SUMMARY %s < %t
4
5 ; SUMMARY:      GlobalValueMap:
6 ; SUMMARY-NEXT:   42:
7 ; SUMMARY-NEXT:     - TypeTests:
8 ; SUMMARY-NEXT:         - 123
9 ; SUMMARY-NEXT: TypeIdMap:
10 ; SUMMARY-NEXT:   typeid1:
11 ; SUMMARY-NEXT:     TTRes:
12 ; SUMMARY-NEXT:       Kind:            Unsat
13 ; SUMMARY-NEXT:       SizeBitWidth:    0
14
15 target datalayout = "e-p:32:32"
16
17 declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone
18
19 define i1 @foo(i8* %p) {
20   %x = call i1 @llvm.type.test(i8* %p, metadata !"typeid1")
21   ; CHECK: ret i1 false
22   ret i1 %x
23 }