File: kernel_code_t_recurse.ll

package info (click to toggle)
llvm-toolchain-21 1%3A21.1.4-5
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,236,516 kB
  • sloc: cpp: 7,619,569; ansic: 1,433,956; asm: 1,058,748; python: 252,181; f90: 94,671; objc: 70,753; lisp: 42,813; pascal: 18,401; sh: 8,601; ml: 5,111; perl: 4,720; makefile: 3,585; awk: 3,523; javascript: 2,272; xml: 892; fortran: 770
file content (24 lines) | stat: -rw-r--r-- 588 bytes parent folder | download | duplicates (17)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
; RUN: llc -mtriple=amdgcn-mesa-mesa3d < %s | FileCheck %s

; CHECK-LABEL: non_kernel_recursion:
define void @non_kernel_recursion(i32 %val) #2 {
  %cmp = icmp eq i32 %val, 0
  br i1 %cmp, label %ret, label %call

call:
  %val.sub1 = sub i32 %val, 1
  call void @non_kernel_recursion(i32 %val.sub1)
  br label %ret

ret:
  ret void
}

; CHECK-LABEL: kernel_caller_recursion:
; CHECK: .amd_kernel_code_t
; CHECK: is_dynamic_callstack = 1
; CHECK: .end_amd_kernel_code_t
define amdgpu_kernel void @kernel_caller_recursion(i32 %n) #0 {
  call void @non_kernel_recursion(i32 %n)
  ret void
}