1 ; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
3 declare ptr @llvm.frameaddress(i32 immarg)
4 declare ptr @llvm.returnaddress(i32 immarg)
6 define ptr @non_const_depth_frameaddress(i32 %x) nounwind {
7 ; CHECK: immarg operand has non-immediate parameter
9 ; CHECK-NEXT: %1 = call ptr @llvm.frameaddress.p0(i32 %x)
10 %1 = call ptr @llvm.frameaddress(i32 %x)
14 define ptr @non_const_depth_returnaddress(i32 %x) nounwind {
15 ; CHECK: immarg operand has non-immediate parameter
17 ; CHECK-NEXT: %1 = call ptr @llvm.returnaddress(i32 %x)
18 %1 = call ptr @llvm.returnaddress(i32 %x)