38 lines · plain
1; RUN: opt -S -passes=lowertypetests %s | llc -asm-verbose=false | FileCheck %s2 3target datalayout = "e-p:64:64"4target triple = "x86_64-unknown-linux-gnu"5 6; CHECK: a:7; CHECK-NEXT: .quad f18; CHECK-NEXT: .quad .L.cfi.jumptable9; CHECK-NEXT: .quad .L.cfi.jumptable10; CHECK-NEXT: .quad f211; CHECK-NEXT: .quad f312; CHECK-NEXT: .quad f3.cfi13@a = global [6 x ptr] [ptr no_cfi @f1, ptr @f1, ptr @f2, ptr no_cfi @f2, ptr @f3, ptr no_cfi @f3]14 15declare !type !0 void @f1()16 17define internal void @f2() !type !0 {18 ret void19}20 21define void @f3() #0 !type !0 {22 ret void23}24 25declare i1 @llvm.type.test(ptr %ptr, metadata %bitset) nounwind readnone26 27define i1 @foo(ptr %p) {28 %x = call i1 @llvm.type.test(ptr %p, metadata !"typeid1")29 ret i1 %x30}31 32!llvm.module.flags = !{!1}33 34attributes #0 = { "cfi-canonical-jump-table" }35 36!0 = !{i32 0, !"typeid1"}37!1 = !{i32 4, !"CFI Canonical Jump Tables", i32 0}38