File: scheduler-rp-calc-one-successor-two-predecessors-bug.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 (85 lines) | stat: -rw-r--r-- 3,568 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
; RUN: llc -mtriple=amdgcn -mcpu=gfx900 < %s | FileCheck -check-prefix=GFX900 %s

declare void @llvm.amdgcn.kill(i1)
declare <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 immarg, float, float, <8 x i32>, <4 x i32>, i1 immarg, i32 immarg, i32 immarg)
declare <2 x half> @llvm.amdgcn.cvt.pkrtz(float, float)
declare void @llvm.amdgcn.exp.compr.v2f16(i32 immarg, i32 immarg, <2 x half>, <2 x half>, i1 immarg, i1 immarg)

define amdgpu_ps void @_amdgpu_ps_main(float %arg) {
; GFX900-LABEL: _amdgpu_ps_main:
; GFX900:       ; %bb.0: ; %bb
; GFX900-NEXT:    s_mov_b64 s[4:5], exec
; GFX900-NEXT:    s_wqm_b64 exec, exec
; GFX900-NEXT:    v_mov_b32_e32 v1, v0
; GFX900-NEXT:    s_mov_b32 s0, 0
; GFX900-NEXT:    v_cmp_ngt_f32_e32 vcc, 0, v1
; GFX900-NEXT:    ; implicit-def: $vgpr0
; GFX900-NEXT:    ; implicit-def: $sgpr2
; GFX900-NEXT:    s_and_saveexec_b64 s[6:7], vcc
; GFX900-NEXT:    s_xor_b64 s[6:7], exec, s[6:7]
; GFX900-NEXT:    s_cbranch_execz .LBB0_2
; GFX900-NEXT:  ; %bb.1: ; %bb1
; GFX900-NEXT:    v_mov_b32_e32 v0, 0
; GFX900-NEXT:    s_mov_b32 s1, s0
; GFX900-NEXT:    s_mov_b32 s2, s0
; GFX900-NEXT:    s_mov_b32 s3, s0
; GFX900-NEXT:    s_mov_b32 s8, s0
; GFX900-NEXT:    s_mov_b32 s9, s0
; GFX900-NEXT:    s_mov_b32 s10, s0
; GFX900-NEXT:    s_mov_b32 s11, s0
; GFX900-NEXT:    s_mov_b32 s12, s0
; GFX900-NEXT:    s_mov_b32 s13, s0
; GFX900-NEXT:    s_mov_b32 s14, s0
; GFX900-NEXT:    s_mov_b32 s15, s0
; GFX900-NEXT:    image_sample v[0:1], v[0:1], s[8:15], s[0:3] dmask:0x3
; GFX900-NEXT:    s_mov_b32 s2, 1.0
; GFX900-NEXT:  .LBB0_2: ; %Flow
; GFX900-NEXT:    s_or_saveexec_b64 s[0:1], s[6:7]
; GFX900-NEXT:    s_and_b64 exec, exec, s[4:5]
; GFX900-NEXT:    s_and_b64 s[0:1], exec, s[0:1]
; GFX900-NEXT:    v_mov_b32_e32 v2, s2
; GFX900-NEXT:    s_xor_b64 exec, exec, s[0:1]
; GFX900-NEXT:    s_cbranch_execz .LBB0_5
; GFX900-NEXT:  ; %bb.3: ; %bb5
; GFX900-NEXT:    s_andn2_b64 s[4:5], s[4:5], exec
; GFX900-NEXT:    s_cbranch_scc0 .LBB0_6
; GFX900-NEXT:  ; %bb.4: ; %bb5
; GFX900-NEXT:    s_mov_b64 exec, 0
; GFX900-NEXT:    s_waitcnt vmcnt(0)
; GFX900-NEXT:    v_mov_b32_e32 v1, 0
; GFX900-NEXT:    v_mov_b32_e32 v2, 0
; GFX900-NEXT:  .LBB0_5: ; %bb6
; GFX900-NEXT:    s_or_b64 exec, exec, s[0:1]
; GFX900-NEXT:    s_waitcnt vmcnt(0)
; GFX900-NEXT:    v_cvt_pkrtz_f16_f32 v1, 0, v1
; GFX900-NEXT:    v_cvt_pkrtz_f16_f32 v0, v2, v0
; GFX900-NEXT:    exp mrt0 off, off, off, off compr
; GFX900-NEXT:    s_endpgm
; GFX900-NEXT:  .LBB0_6:
; GFX900-NEXT:    s_mov_b64 exec, 0
; GFX900-NEXT:    exp null off, off, off, off done vm
; GFX900-NEXT:    s_endpgm
bb:
  %i = fcmp olt float %arg, 0.000000e+00
  br i1 %i, label %bb5, label %bb1

bb1:
  %i2 = call <4 x float> @llvm.amdgcn.image.sample.2d.v4f32.f32(i32 15, float 0.000000e+00, float %arg, <8 x i32> zeroinitializer, <4 x i32> zeroinitializer, i1 false, i32 0, i32 0)
  %i3 = extractelement <4 x float> %i2, i64 1
  %i4 = extractelement <4 x float> %i2, i64 0
  br label %bb6

bb5:
  call void @llvm.amdgcn.kill(i1 false)
  br label %bb6

bb6:
  %i7 = phi float [ 0.000000e+00, %bb5 ], [ %i3, %bb1 ]
  %i8 = phi float [ 0.000000e+00, %bb5 ], [ 1.000000e+00, %bb1 ]
  %i9 = phi float [ undef, %bb5 ], [ %i4, %bb1 ]
  %i10 = call <2 x half> @llvm.amdgcn.cvt.pkrtz(float 0.000000e+00, float %i7)
  %i11 = call <2 x half> @llvm.amdgcn.cvt.pkrtz(float %i8, float %i9)
  call void @llvm.amdgcn.exp.compr.v2f16(i32 0, i32 0, <2 x half> %i10, <2 x half> %i11, i1 false, i1 false)
  ret void
}