1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00
llvm-mirror/test/Other/2009-03-31-CallGraph.ll
Arthur Eubanks a8846deae8 [PruneEH] Pin tests to legacy PM
prune-eh will not be ported to the NPM. Instead, a combination of
function-attrs and simplifycfg should be used (as described in
https://reviews.llvm.org/D44415).

This pins most tests using -prune-eh to the legacy PM. Some of these
were testing legacy PM infra (mostly the CGPassManager). Some of these
can be tested in the NPM using function-attrs and simplifycfg.

One interesting case is simplenoreturntest.ll. function-attrs +
simplifycfg does not yet make a caller of a caller of a noreturn
function end with unreachable like prune-eh does. That can be added in
the future.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D90012
2020-10-29 18:17:55 -07:00

37 lines
619 B
LLVM

; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0
define void @f2() personality i32 (...)* @__gxx_personality_v0 {
invoke void @f6()
to label %ok1 unwind label %lpad1
ok1:
ret void
lpad1:
landingpad {i8*, i32}
cleanup
invoke void @f4()
to label %ok2 unwind label %lpad2
ok2:
call void @f8()
unreachable
lpad2:
%exn = landingpad {i8*, i32}
cleanup
unreachable
}
declare void @f3()
define void @f4() {
call void @f3()
ret void
}
declare void @f6() nounwind
declare void @f8()
declare i32 @__gxx_personality_v0(...)