1 ; RUN: llvm-as < %s | opt -instcombine -disable-output &&
2 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep call
4 ;; Test that llvm.stackrestore is removed when possible.
7 %tmp = call sbyte* %llvm.stacksave()
8 call void %llvm.stackrestore(sbyte* %tmp) ;; not restoring anything
9 %A = alloca int, uint %P
13 void %test2(sbyte* %X) {
14 call void %llvm.stackrestore(sbyte* %X) ;; no allocas before return.
18 declare sbyte* %llvm.stacksave()
20 declare void %llvm.stackrestore(sbyte*)