Added the ability to xfail based on llvmgcc version
[llvm-complete.git] / test / Transforms / InstCombine / stacksaverestore.ll
blobc41a1b1e7fcac46dd1dea2295db78760b1ff12e4
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.
6 int* %test1(uint %P) {
7         %tmp = call sbyte* %llvm.stacksave()
8         call void %llvm.stackrestore(sbyte* %tmp) ;; not restoring anything
9         %A = alloca int, uint %P
10         ret int* %A
13 void %test2(sbyte* %X) {
14         call void %llvm.stackrestore(sbyte* %X)  ;; no allocas before return.
15         ret void
18 declare sbyte* %llvm.stacksave()
20 declare void %llvm.stackrestore(sbyte*)