diff options
Diffstat (limited to 'llvm/test/CodeGen/X86/eh-null-personality.ll')
| -rw-r--r-- | llvm/test/CodeGen/X86/eh-null-personality.ll | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/X86/eh-null-personality.ll b/llvm/test/CodeGen/X86/eh-null-personality.ll new file mode 100644 index 00000000000..536f060db8d --- /dev/null +++ b/llvm/test/CodeGen/X86/eh-null-personality.ll @@ -0,0 +1,25 @@ +; RUN: llc -mtriple=x86_64-linux < %s | FileCheck %s + +; We should treat non-Function personalities as the unknown personality, which +; is usually Itanium. + +declare void @g() +declare void @terminate(i8*) + +define void @f() personality i8* null { + invoke void @g() + to label %ret unwind label %lpad +ret: + ret void +lpad: + %vals = landingpad { i8*, i32 } catch i8* null + %ptr = extractvalue { i8*, i32 } %vals, 0 + call void @terminate(i8* %ptr) + unreachable +} + +; CHECK: f: +; CHECK: callq g +; CHECK: retq +; CHECK: movq %rax, %rdi +; CHECK: callq terminate |

