1 ; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep {call.*stackrestore}
3 ;; Test that llvm.stackrestore is removed when possible.
6 %tmp = call sbyte* %llvm.stacksave()
7 call void %llvm.stackrestore(sbyte* %tmp) ;; not restoring anything
8 %A = alloca int, uint %P
12 void %test2(sbyte* %X) {
13 call void %llvm.stackrestore(sbyte* %X) ;; no allocas before return.
17 declare sbyte* %llvm.stacksave()
19 declare void %llvm.stackrestore(sbyte*)