mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-09 05:31:19 +00:00
11f1a8335e
fixes PR11038, but there are still some cleanups to be done. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141204 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
533 B
LLVM
30 lines
533 B
LLVM
; RUN: opt < %s -tailcallelim -S | FileCheck %s
|
|
|
|
; Test that we don't tail call in a functions that calls returns_twice
|
|
; functions.
|
|
|
|
declare void @bar()
|
|
|
|
; CHECK: foo1
|
|
; CHECK-NOT: tail call void @bar()
|
|
|
|
define void @foo1(i32* %x) {
|
|
bb:
|
|
%tmp75 = tail call i32 @setjmp(i32* %x)
|
|
call void @bar()
|
|
ret void
|
|
}
|
|
|
|
declare i32 @setjmp(i32*)
|
|
|
|
; CHECK: foo2
|
|
; CHECK-NOT: tail call void @bar()
|
|
|
|
define void @foo2(i32* %x) {
|
|
bb:
|
|
%tmp75 = tail call i32 @zed2(i32* %x)
|
|
call void @bar()
|
|
ret void
|
|
}
|
|
declare i32 @zed2(i32*) returns_twice
|