mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
[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
This commit is contained in:
parent
aa15299666
commit
a8846deae8
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output
|
||||
; 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
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0
|
||||
|
||||
define linkonce void @caller() {
|
||||
call void @callee( )
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0
|
||||
|
||||
%"struct.std::__codecvt_abstract_base<char,char,__mbstate_t>" = type { %"struct.std::locale::facet" }
|
||||
%"struct.std::basic_streambuf<wchar_t,std::char_traits<wchar_t> >" = type { i32 (...)**, i32*, i32*, i32*, i32*, i32*, i32*, %"struct.std::locale" }
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0
|
||||
; PR827
|
||||
@_ZTV8CRjii = internal global [1 x i32 (...)*] [ i32 (...)* @_ZN8CRjii12NlFeeEPN5Jr7sE ] ; <[1 x i32 (...)*]*> [#uses=0]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0
|
||||
; PR993
|
||||
target datalayout = "e-p:32:32"
|
||||
target triple = "i386-unknown-openbsd3.9"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output
|
||||
; RUN: opt < %s -inline -prune-eh -disable-output -enable-new-pm=0
|
||||
; PR992
|
||||
target datalayout = "e-p:32:32"
|
||||
target triple = "i686-pc-linux-gnu"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -prune-eh -inline -jump-threading -S < %s | FileCheck %s
|
||||
; RUN: opt -prune-eh -inline -jump-threading -S -enable-new-pm=0 < %s | FileCheck %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -prune-eh -S | FileCheck %s
|
||||
; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
|
||||
|
||||
; We should not infer 'nounwind' for/from a weak function,
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -S -prune-eh < %s | FileCheck %s
|
||||
; RUN: opt -S -prune-eh -enable-new-pm=0 < %s | FileCheck %s
|
||||
; RUN: opt -S -passes='function-attrs,function(simplify-cfg)' < %s | FileCheck %s
|
||||
|
||||
declare void @may_throw()
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt < %s -prune-eh -S | FileCheck %s
|
||||
; RUN: opt < %s -prune-eh -S -enable-new-pm=0 | FileCheck %s
|
||||
; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
|
||||
|
||||
declare void @nounwind() nounwind
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
; RUN: opt -prune-eh -S < %s | FileCheck %s
|
||||
; RUN: opt -prune-eh -enable-new-pm=0 -S < %s | FileCheck %s
|
||||
; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
|
||||
|
||||
declare void @noreturn()
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -prune-eh -S | FileCheck %s
|
||||
; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
|
||||
|
||||
declare void @nounwind() nounwind
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -S -prune-eh < %s | FileCheck %s
|
||||
; RUN: opt -S -prune-eh -enable-new-pm=0 < %s | FileCheck %s
|
||||
; RUN: opt -S -passes='function-attrs,function(simplify-cfg)' < %s | FileCheck %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
|
@ -2,7 +2,7 @@
|
||||
; so it leaves some of the unreachable stuff hanging around.
|
||||
; Checking it with CHECK-OLD.
|
||||
;
|
||||
; RUN: opt -prune-eh -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD
|
||||
; RUN: opt -prune-eh -enable-new-pm=0 -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-OLD
|
||||
; RUN: opt -passes='function-attrs,function(simplify-cfg)' -S < %s | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-NEW
|
||||
|
||||
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -prune-eh -S | FileCheck %s
|
||||
; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
|
||||
|
||||
; CHECK-LABEL: define internal i32 @foo()
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt -S -prune-eh < %s | FileCheck %s
|
||||
; RUN: opt -S -prune-eh -enable-new-pm=0 < %s | FileCheck %s
|
||||
; RUN: opt -S -passes='function-attrs,function(simplify-cfg)' < %s | FileCheck %s
|
||||
|
||||
; Don't remove invokes of nounwind functions if the personality handles async
|
||||
|
@ -1,13 +1,13 @@
|
||||
; RUN: opt < %s -prune-eh -S | not grep "ret i32"
|
||||
; RUN: opt < %s -prune-eh -S -enable-new-pm=0 | not grep "ret i32"
|
||||
|
||||
declare void @noreturn() noreturn
|
||||
|
||||
define i32 @caller() {
|
||||
call void @noreturn( )
|
||||
call void @noreturn()
|
||||
ret i32 17
|
||||
}
|
||||
|
||||
define i32 @caller2() {
|
||||
%T = call i32 @caller( ) ; <i32> [#uses=1]
|
||||
%T = call i32 @caller()
|
||||
ret i32 %T
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
; RUN: opt < %s -prune-eh -S | FileCheck %s
|
||||
; RUN: opt < %s -prune-eh -enable-new-pm=0 -S | FileCheck %s
|
||||
; RUN: opt < %s -passes='function-attrs,function(simplify-cfg)' -S | FileCheck %s
|
||||
|
||||
declare void @nounwind() nounwind
|
||||
|
Loading…
x
Reference in New Issue
Block a user