Files
clang-p2996/llvm/test/Transforms/GlobalOpt/coldcc_stress_test.ll
Bjorn Pettersson 8ebb3eac02 [test] Use -passes syntax when specifying pipeline in some more tests
The legacy PM is deprecated, so update a bunch of lit tests running
opt to use the new PM syntax when specifying the pipeline.
In this patch focus has been put on test cases for ConstantMerge,
ConstraintElimination, CorrelatedValuePropagation, GlobalDCE,
GlobalOpt, SCCP, TailCallElim and PredicateInfo.

Differential Revision: https://reviews.llvm.org/D114516
2021-11-27 09:52:55 +01:00

49 lines
1.4 KiB
LLVM

; RUN: opt < %s -passes=globalopt -S -enable-coldcc-stress-test -mtriple=powerpc64le-unknown-linux-gnu | FileCheck %s -check-prefix=COLDCC
; RUN: opt < %s -passes=globalopt -S | FileCheck %s -check-prefix=CHECK
define internal i32 @callee_default(i32* %m) {
; COLDCC-LABEL: define internal coldcc i32 @callee_default
; CHECK-LABEL: define internal fastcc i32 @callee_default
%v = load i32, i32* %m
ret i32 %v
}
define internal fastcc i32 @callee_fastcc(i32* %m) {
; COLDCC-LABEL: define internal fastcc i32 @callee_fastcc
; CHECK-LABEL: define internal fastcc i32 @callee_fastcc
%v = load i32, i32* %m
ret i32 %v
}
define internal coldcc i32 @callee_coldcc(i32* %m) {
; COLDCC-LABEL: define internal coldcc i32 @callee_coldcc
; CHECK-LABEL: define internal coldcc i32 @callee_coldcc
%v = load i32, i32* %m
ret i32 %v
}
define i32 @callee(i32* %m) {
%v = load i32, i32* %m
ret i32 %v
}
define void @caller() {
%m = alloca i32
call i32 @callee_default(i32* %m)
call fastcc i32 @callee_fastcc(i32* %m)
call coldcc i32 @callee_coldcc(i32* %m)
call i32 @callee(i32* %m)
ret void
}
; COLDCC-LABEL: define void @caller()
; COLDCC: call coldcc i32 @callee_default
; COLDCC: call fastcc i32 @callee_fastcc
; COLDCC: call coldcc i32 @callee_coldcc
; COLDCC: call i32 @callee
; CHECK-LABEL: define void @caller()
; CHECK: call fastcc i32 @callee_default
; CHECK: call fastcc i32 @callee_fastcc
; CHECK: call coldcc i32 @callee_coldcc
; CHECK: call i32 @callee