Skip to content

Commit d1a7d52

Browse files
committed
Add test
1 parent db6d7b1 commit d1a7d52

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/test/CodeGen/RISCV/nest-register.ll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
; RUN: | FileCheck -check-prefix=RV64I %s
66
; RUN: llc -mtriple=riscv64 -mattr=+experimental-zicfilp -verify-machineinstrs < %s \
77
; RUN: | FileCheck -check-prefix=RV64I-ZICFILP %s
8+
; RUN: not llc -mtriple=riscv64 -target-abi=lp64e -mattr=+experimental-zicfilp \
9+
; RUN: -verify-machineinstrs < %s 2>&1 | FileCheck -check-prefix=LP64E-ZICFILP %s
810

911
; Tests that the 'nest' parameter attribute causes the relevant parameter to be
1012
; passed in the right register.
@@ -63,6 +65,7 @@ define ptr @nest_caller(ptr %arg) nounwind {
6365
ret ptr %result
6466
}
6567

68+
; LP64E-ZICFILP: LLVM ERROR: Nested functions with control flow protection are not usable with ILP32E or LP64E ABI.
6669
!llvm.module.flags = !{!0}
6770

6871
!0 = !{i32 8, !"cf-protection-branch", i32 1}

0 commit comments

Comments
 (0)