xref: /llvm-project/llvm/test/CodeGen/SystemZ/ghc-cc-05.ll (revision a1710eb3cd5823c5d14899112ca3086acbdbe9cb)
1; Check that the GHC calling convention works (s390x)
2; Variable-sized stack allocations are not supported in GHC calling convention
3;
4; RUN: not --crash llc -mtriple=s390x-ibm-linux < %s 2>&1 | FileCheck %s
5
6define ghccc void @foo() nounwind {
7entry:
8  %0 = call ptr @llvm.stacksave()
9  call void @llvm.stackrestore(ptr %0)
10  ret void
11}
12
13declare ptr @llvm.stacksave()
14declare void @llvm.stackrestore(ptr)
15
16; CHECK: LLVM ERROR: Variable-sized stack allocations are not supported in GHC calling convention
17