]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/blob - test/CodeGen/X86/indirect-hidden.ll
[X86][AVX] Simplified diff between AVX1 and SSE42 fp stack folding tests. NFC.
[opencl/llvm.git] / test / CodeGen / X86 / indirect-hidden.ll
1 ; RUN: llc -mtriple=i686-apple-macosx -o - %s | FileCheck %s
3 ; x86 doesn't normally use indirect symbols, particularly hidden ones, but it
4 ; can be tricked into it for exception-handling typeids.
6 @hidden_typeid = external hidden constant i8*
7 @normal_typeid = external constant i8*
9 declare void @throws()
11 define void @get_indirect_hidden() {
12   invoke void @throws() to label %end unwind label %lpad
13 lpad:
14   %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
15           catch i8* bitcast (i8** @hidden_typeid to i8*)
16   br label %end
18 end:
19   ret void
20 }
22 define void @get_indirect() {
23   invoke void @throws() to label %end unwind label %lpad
24 lpad:
25   %tmp = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
26           catch i8* bitcast (i8** @normal_typeid to i8*)
27   br label %end
29 end:
30   ret void
31 }
33 declare i32 @__gxx_personality_v0(...)
35 ; CHECK: .section __IMPORT,__pointers,non_lazy_symbol_pointers
37 ; CHECK-NOT: __DATA,__data
38 ; CHECK: .indirect_symbol _normal_typeid
39 ; CHECK-NEXT: .long 0
41 ; CHECK-NOT: __DATA,__data
42 ; CHECK: .indirect_symbol _hidden_typeid
43 ; CHECK-NEXT: .long 0