mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
upgrade this test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47257 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e26dec68a1
commit
28cb2051c8
@ -1,19 +1,19 @@
|
|||||||
; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep {call.*stackrestore}
|
; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep {call.*stackrestore}
|
||||||
|
|
||||||
;; Test that llvm.stackrestore is removed when possible.
|
;; Test that llvm.stackrestore is removed when possible.
|
||||||
|
define i32* @test1(i32 %P) {
|
||||||
int* %test1(uint %P) {
|
%tmp = call i8* @llvm.stacksave( )
|
||||||
%tmp = call sbyte* %llvm.stacksave()
|
call void @llvm.stackrestore( i8* %tmp ) ;; not restoring anything
|
||||||
call void %llvm.stackrestore(sbyte* %tmp) ;; not restoring anything
|
%A = alloca i32, i32 %P
|
||||||
%A = alloca int, uint %P
|
ret i32* %A
|
||||||
ret int* %A
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void %test2(sbyte* %X) {
|
define void @test2(i8* %X) {
|
||||||
call void %llvm.stackrestore(sbyte* %X) ;; no allocas before return.
|
call void @llvm.stackrestore( i8* %X ) ;; no allocas before return.
|
||||||
ret void
|
ret void
|
||||||
}
|
}
|
||||||
|
|
||||||
declare sbyte* %llvm.stacksave()
|
declare i8* @llvm.stacksave()
|
||||||
|
|
||||||
|
declare void @llvm.stackrestore(i8*)
|
||||||
|
|
||||||
declare void %llvm.stackrestore(sbyte*)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user