LowerTypeTests: Add a test that covers "unsatisfiable" type metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288881 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Peter Collingbourne 2016-12-07 03:04:34 +00:00
parent c53f76cc0b
commit 99d6e95c74

View File

@ -0,0 +1,12 @@
; FIXME: We should not require -O2 to simplify this to return false.
; RUN: opt -S -lowertypetests -O2 < %s | FileCheck %s
target datalayout = "e-p:32:32"
declare i1 @llvm.type.test(i8* %ptr, metadata %bitset) nounwind readnone
define i1 @foo(i8* %p) {
%x = call i1 @llvm.type.test(i8* %p, metadata !"typeid1")
; CHECK: ret i1 false
ret i1 %x
}