1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 12:02:58 +02:00
llvm-mirror/test/CodeGen/X86/cleanuppad-large-codemodel.ll
David Majnemer 608538dccc [WinEH] Use operand bundles to describe call sites
SimplifyCFG allows tail merging with code which terminates in
unreachable which, in turn, makes it possible for an invoke to end up in
a funclet which it was not originally part of.

Using operand bundles on invokes allows us to determine whether or not
an invoke was part of a funclet in the source program.

Furthermore, it allows us to unambiguously answer questions about the
legality of inlining into call sites which the personality may have
trouble with.

Differential Revision: http://reviews.llvm.org/D15517

llvm-svn: 255674
2015-12-15 21:27:27 +00:00

28 lines
669 B
LLVM

; RUN: llc -mtriple=x86_64-pc-windows-msvc -code-model=large -o - < %s | FileCheck %s
declare i32 @__CxxFrameHandler3(...)
declare void @bar()
define void @foo() personality i32 (...)* @__CxxFrameHandler3 {
entry:
invoke void @bar()
to label %exit unwind label %cleanup
cleanup:
%c = cleanuppad within none []
call void @bar() [ "funclet"(token %c) ]
cleanupret from %c unwind to caller
exit:
ret void
}
; CHECK: foo: # @foo
; CHECK: movabsq $bar, %[[reg:[^ ]*]]
; CHECK: callq *%[[reg]]
; CHECK: retq
; CHECK: "?dtor$2@?0?foo@4HA":
; CHECK: movabsq $bar, %[[reg:[^ ]*]]
; CHECK: callq *%[[reg]]
; CHECK: retq # CLEANUPRET