You've already forked linux-packaging-mono
Imported Upstream version 5.18.0.179
Former-commit-id: 67aa10e65b237e1c4537630979ee99ebe1374215
This commit is contained in:
parent
d6bde52373
commit
8625704ad8
34
external/llvm/test/Transforms/GlobalOpt/musttail_cc.ll
vendored
Normal file
34
external/llvm/test/Transforms/GlobalOpt/musttail_cc.ll
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
; RUN: opt < %s -globalopt -S | FileCheck %s
|
||||
; PR36546
|
||||
|
||||
; Check that musttail callee preserves its calling convention
|
||||
|
||||
define i32 @test(i32 %a) {
|
||||
; CHECK: %ca = musttail call i32 @foo(i32 %a)
|
||||
%ca = musttail call i32 @foo(i32 %a)
|
||||
ret i32 %ca
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define internal i32 @foo(i32 %a)
|
||||
define internal i32 @foo(i32 %a) {
|
||||
ret i32 %a
|
||||
}
|
||||
|
||||
; Check that musttail caller preserves its calling convention
|
||||
|
||||
define i32 @test2(i32 %a) {
|
||||
%ca = call i32 @foo1(i32 %a)
|
||||
ret i32 %ca
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define internal i32 @foo1(i32 %a)
|
||||
define internal i32 @foo1(i32 %a) {
|
||||
; CHECK: %ca = musttail call i32 @foo2(i32 %a)
|
||||
%ca = musttail call i32 @foo2(i32 %a)
|
||||
ret i32 %ca
|
||||
}
|
||||
|
||||
; CHECK-LABEL: define internal i32 @foo2(i32 %a)
|
||||
define internal i32 @foo2(i32 %a) {
|
||||
ret i32 %a
|
||||
}
|
Reference in New Issue
Block a user