File: uniform-crash.ll

package info (click to toggle)
llvm-toolchain-19 1%3A19.1.7-3~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 1,998,492 kB
  • sloc: cpp: 6,951,680; ansic: 1,486,157; asm: 913,598; python: 232,024; f90: 80,126; objc: 75,281; lisp: 37,276; pascal: 16,990; sh: 10,009; ml: 5,058; perl: 4,724; awk: 3,523; makefile: 3,167; javascript: 2,504; xml: 892; fortran: 664; cs: 573
file content (57 lines) | stat: -rw-r--r-- 1,840 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
; RUN: llc < %s -mtriple=amdgcn -mcpu=verde -verify-machineinstrs | FileCheck --check-prefix=GCN %s
; RUN: llc < %s -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs | FileCheck --check-prefix=GCN %s

; GCN-LABEL: {{^}}icmp_2_users:
; GCN: s_cmp_lt_i32 s{{[0-9]+}}, 1
; GCN: s_cbranch_scc1 [[LABEL:.LBB[0-9_A-Z]+]]
; GCN: [[LABEL]]:
; GCN-NEXT: s_endpgm
define amdgpu_kernel void @icmp_2_users(ptr addrspace(1) %out, i32 %cond) {
main_body:
  %0 = icmp sgt i32 %cond, 0
  %1 = sext i1 %0 to i32
  br i1 %0, label %IF, label %ENDIF

IF:
  store i32 %1, ptr addrspace(1) %out
  br label %ENDIF

ENDIF:                                            ; preds = %IF, %main_body
  ret void
}

; GCN-LABEL: {{^}}fix_sgpr_live_ranges_crash:
; GCN: s_cbranch_scc1 [[BB0:.L[A-Z0-9_]+]]
; GCN: {{^}}[[LOOP:.L[A-Z0-9_]+]]:
; GCN: s_cbranch_scc1 [[LOOP]]
; GCN: {{^}}[[BB0]]:
define amdgpu_kernel void @fix_sgpr_live_ranges_crash(i32 %arg, i32 %arg1, i1 %c0)  {
bb:
  %cnd = trunc i32 %arg to i1
  br i1 %cnd, label %bb2, label %bb5

bb2:                                              ; preds = %bb
  %tmp = mul i32 10, %arg1
  br label %bb3

bb3:                                              ; preds = %bb3, %bb2
  %val = load volatile i32, ptr addrspace(4) undef
  %tmp4 = icmp eq i32 %val, %arg1
  br i1 %tmp4, label %bb5, label %bb3

bb5:                                              ; preds = %bb3, %bb
  %tmp6 = tail call i32 @llvm.amdgcn.workitem.id.y() #1
  %tmp10 = icmp ult i32 %tmp6, %arg
  br i1 %tmp10, label %bb11, label %bb12

bb11:                                             ; preds = %bb11, %bb5
  br i1 %c0, label %bb11, label %bb12

bb12:                                             ; preds = %bb11, %bb5
  ret void
}

; Function Attrs: nounwind readnone
declare i32 @llvm.amdgcn.workitem.id.y() #1

attributes #1 = { nounwind readnone }