• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s
2
3; We should treat non-Function personalities as the unknown personality, which
4; is usually Itanium.
5
6declare void @g()
7declare void @terminate(i8*)
8
9define void @f() personality i8* null {
10  invoke void @g()
11    to label %ret unwind label %lpad
12ret:
13  ret void
14lpad:
15  %vals = landingpad { i8*, i32 } catch i8* null
16  %ptr = extractvalue { i8*, i32 } %vals, 0
17  call void @terminate(i8* %ptr)
18  unreachable
19}
20
21; CHECK: f:
22; CHECK: callq g
23; CHECK: retq
24; CHECK: movq %rax, %rdi
25; CHECK: callq terminate
26