OSDN Git Service

Merge "Take HOST_PREFER_32_BIT into account"
[android-x86/external-llvm.git] / test / CodeGen / X86 / cfi_invoke.ll
1 ; RUN: llc <%s -fcfi -cfi-type=sub | FileCheck %s
2 ; ModuleID = 'test.cc'
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
5
6 declare i32 @__gxx_personality_v0(...)
7
8 @_ZTIPKc = external constant i8*
9 @_ZTIi = external constant i8*
10
11 define void @f() unnamed_addr jumptable {
12   ret void
13 }
14
15 @a = global void ()* @f
16
17 ; Make sure invoke gets targeted as well as regular calls
18 define void @_Z3foov(void ()* %f) uwtable ssp {
19 ; CHECK-LABEL: _Z3foov:
20  entry:
21    invoke void %f()
22            to label %try.cont unwind label %lpad
23 ; CHECK: callq __llvm_cfi_pointer_warning
24 ; CHECK: callq *%rbx
25
26  lpad:
27    %0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
28                                   catch i8* bitcast (i8** @_ZTIi to i8*)
29                                   filter [1 x i8*] [i8* bitcast (i8** @_ZTIPKc to i8*)]
30    ret void
31
32  try.cont:
33    ret void
34 }
35