
This reverts commit 959448fbd6bc6f74fb3f9655b1387d0e8a272ab8. Reverting because multiple test failures e.g. https://lab.llvm.org/buildbot/#/builders/187/builds/1290 https://lab.llvm.org/buildbot/#/builders/153/builds/9389 and maybe a few others.
30 lines
817 B
LLVM
30 lines
817 B
LLVM
; RUN: opt -S -passes=deadargelim < %s | FileCheck %s
|
|
target triple = "x86_64-pc-windows-msvc"
|
|
|
|
define internal void @callee(ptr) {
|
|
entry:
|
|
call void @thunk()
|
|
ret void
|
|
}
|
|
|
|
define void @test1() personality ptr @__CxxFrameHandler3 {
|
|
entry:
|
|
invoke void @thunk()
|
|
to label %good1 unwind label %bad1
|
|
|
|
good1: ; preds = %entry-block
|
|
ret void
|
|
|
|
bad1: ; preds = %entry-block
|
|
%pad1 = cleanuppad within none []
|
|
call void @callee(ptr null) [ "funclet"(token %pad1) ]
|
|
cleanupret from %pad1 unwind to caller
|
|
}
|
|
; CHECK-LABEL: define void @test1(
|
|
; CHECK: %[[pad:.*]] = cleanuppad within none []
|
|
; CHECK-NEXT: call void @callee() [ "funclet"(token %[[pad]]) ]
|
|
|
|
declare void @thunk()
|
|
|
|
declare i32 @__CxxFrameHandler3(...)
|