File: insertelement.large.ll

package info (click to toggle)
llvm-toolchain-15 1%3A15.0.6-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,554,644 kB
  • sloc: cpp: 5,922,452; ansic: 1,012,136; asm: 674,362; python: 191,568; objc: 73,855; f90: 42,327; lisp: 31,913; pascal: 11,973; javascript: 10,144; sh: 9,421; perl: 7,447; ml: 5,527; awk: 3,523; makefile: 2,520; xml: 885; cs: 573; fortran: 567
file content (166 lines) | stat: -rw-r--r-- 9,405 bytes parent folder | download
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX10 %s
; RUN: llc -global-isel -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck -check-prefix=GFX11 %s

define amdgpu_kernel void @v_insert_v64i32_37(<64 x i32> addrspace(1)* %ptr.in, <64 x i32> addrspace(1)* %ptr.out) #0 {
; GCN-LABEL: v_insert_v64i32_37:
; GCN:       ; %bb.0:
; GCN-NEXT:    s_load_dwordx4 s[0:3], s[4:5], 0x0
; GCN-NEXT:    v_lshlrev_b32_e32 v64, 8, v0
; GCN-NEXT:    s_waitcnt lgkmcnt(0)
; GCN-NEXT:    global_load_dwordx4 v[32:35], v64, s[0:1]
; GCN-NEXT:    global_load_dwordx4 v[36:39], v64, s[0:1] offset:16
; GCN-NEXT:    global_load_dwordx4 v[40:43], v64, s[0:1] offset:32
; GCN-NEXT:    global_load_dwordx4 v[44:47], v64, s[0:1] offset:48
; GCN-NEXT:    global_load_dwordx4 v[48:51], v64, s[0:1] offset:64
; GCN-NEXT:    global_load_dwordx4 v[52:55], v64, s[0:1] offset:80
; GCN-NEXT:    global_load_dwordx4 v[0:3], v64, s[0:1] offset:128
; GCN-NEXT:    global_load_dwordx4 v[56:59], v64, s[0:1] offset:96
; GCN-NEXT:    global_load_dwordx4 v[60:63], v64, s[0:1] offset:112
; GCN-NEXT:    global_load_dwordx4 v[4:7], v64, s[0:1] offset:144
; GCN-NEXT:    global_load_dwordx4 v[8:11], v64, s[0:1] offset:160
; GCN-NEXT:    global_load_dwordx4 v[12:15], v64, s[0:1] offset:176
; GCN-NEXT:    global_load_dwordx4 v[16:19], v64, s[0:1] offset:192
; GCN-NEXT:    global_load_dwordx4 v[20:23], v64, s[0:1] offset:208
; GCN-NEXT:    global_load_dwordx4 v[24:27], v64, s[0:1] offset:224
; GCN-NEXT:    global_load_dwordx4 v[28:31], v64, s[0:1] offset:240
; GCN-NEXT:    s_waitcnt vmcnt(6)
; GCN-NEXT:    v_mov_b32_e32 v5, 0x3e7
; GCN-NEXT:    global_store_dwordx4 v64, v[0:3], s[2:3] offset:128
; GCN-NEXT:    global_store_dwordx4 v64, v[4:7], s[2:3] offset:144
; GCN-NEXT:    s_waitcnt vmcnt(7)
; GCN-NEXT:    global_store_dwordx4 v64, v[8:11], s[2:3] offset:160
; GCN-NEXT:    s_waitcnt vmcnt(7)
; GCN-NEXT:    global_store_dwordx4 v64, v[12:15], s[2:3] offset:176
; GCN-NEXT:    s_waitcnt vmcnt(7)
; GCN-NEXT:    global_store_dwordx4 v64, v[16:19], s[2:3] offset:192
; GCN-NEXT:    s_waitcnt vmcnt(7)
; GCN-NEXT:    global_store_dwordx4 v64, v[20:23], s[2:3] offset:208
; GCN-NEXT:    s_waitcnt vmcnt(7)
; GCN-NEXT:    global_store_dwordx4 v64, v[24:27], s[2:3] offset:224
; GCN-NEXT:    global_store_dwordx4 v64, v[32:35], s[2:3]
; GCN-NEXT:    global_store_dwordx4 v64, v[36:39], s[2:3] offset:16
; GCN-NEXT:    global_store_dwordx4 v64, v[40:43], s[2:3] offset:32
; GCN-NEXT:    global_store_dwordx4 v64, v[44:47], s[2:3] offset:48
; GCN-NEXT:    global_store_dwordx4 v64, v[48:51], s[2:3] offset:64
; GCN-NEXT:    global_store_dwordx4 v64, v[52:55], s[2:3] offset:80
; GCN-NEXT:    global_store_dwordx4 v64, v[56:59], s[2:3] offset:96
; GCN-NEXT:    global_store_dwordx4 v64, v[60:63], s[2:3] offset:112
; GCN-NEXT:    s_waitcnt vmcnt(15)
; GCN-NEXT:    global_store_dwordx4 v64, v[28:31], s[2:3] offset:240
; GCN-NEXT:    s_endpgm
;
; GFX10-LABEL: v_insert_v64i32_37:
; GFX10:       ; %bb.0:
; GFX10-NEXT:    s_load_dwordx4 s[0:3], s[4:5], 0x0
; GFX10-NEXT:    v_lshlrev_b32_e32 v64, 8, v0
; GFX10-NEXT:    s_waitcnt lgkmcnt(0)
; GFX10-NEXT:    s_clause 0xf
; GFX10-NEXT:    global_load_dwordx4 v[32:35], v64, s[0:1]
; GFX10-NEXT:    global_load_dwordx4 v[36:39], v64, s[0:1] offset:16
; GFX10-NEXT:    global_load_dwordx4 v[0:3], v64, s[0:1] offset:128
; GFX10-NEXT:    global_load_dwordx4 v[40:43], v64, s[0:1] offset:32
; GFX10-NEXT:    global_load_dwordx4 v[44:47], v64, s[0:1] offset:48
; GFX10-NEXT:    global_load_dwordx4 v[48:51], v64, s[0:1] offset:64
; GFX10-NEXT:    global_load_dwordx4 v[52:55], v64, s[0:1] offset:80
; GFX10-NEXT:    global_load_dwordx4 v[56:59], v64, s[0:1] offset:96
; GFX10-NEXT:    global_load_dwordx4 v[60:63], v64, s[0:1] offset:112
; GFX10-NEXT:    global_load_dwordx4 v[4:7], v64, s[0:1] offset:144
; GFX10-NEXT:    global_load_dwordx4 v[8:11], v64, s[0:1] offset:160
; GFX10-NEXT:    global_load_dwordx4 v[12:15], v64, s[0:1] offset:176
; GFX10-NEXT:    global_load_dwordx4 v[16:19], v64, s[0:1] offset:192
; GFX10-NEXT:    global_load_dwordx4 v[20:23], v64, s[0:1] offset:208
; GFX10-NEXT:    global_load_dwordx4 v[24:27], v64, s[0:1] offset:224
; GFX10-NEXT:    global_load_dwordx4 v[28:31], v64, s[0:1] offset:240
; GFX10-NEXT:    s_waitcnt vmcnt(6)
; GFX10-NEXT:    v_mov_b32_e32 v5, 0x3e7
; GFX10-NEXT:    global_store_dwordx4 v64, v[0:3], s[2:3] offset:128
; GFX10-NEXT:    global_store_dwordx4 v64, v[4:7], s[2:3] offset:144
; GFX10-NEXT:    s_waitcnt vmcnt(5)
; GFX10-NEXT:    global_store_dwordx4 v64, v[8:11], s[2:3] offset:160
; GFX10-NEXT:    s_waitcnt vmcnt(4)
; GFX10-NEXT:    global_store_dwordx4 v64, v[12:15], s[2:3] offset:176
; GFX10-NEXT:    s_waitcnt vmcnt(3)
; GFX10-NEXT:    global_store_dwordx4 v64, v[16:19], s[2:3] offset:192
; GFX10-NEXT:    s_waitcnt vmcnt(2)
; GFX10-NEXT:    global_store_dwordx4 v64, v[20:23], s[2:3] offset:208
; GFX10-NEXT:    global_store_dwordx4 v64, v[32:35], s[2:3]
; GFX10-NEXT:    global_store_dwordx4 v64, v[36:39], s[2:3] offset:16
; GFX10-NEXT:    global_store_dwordx4 v64, v[40:43], s[2:3] offset:32
; GFX10-NEXT:    global_store_dwordx4 v64, v[44:47], s[2:3] offset:48
; GFX10-NEXT:    global_store_dwordx4 v64, v[48:51], s[2:3] offset:64
; GFX10-NEXT:    global_store_dwordx4 v64, v[52:55], s[2:3] offset:80
; GFX10-NEXT:    global_store_dwordx4 v64, v[56:59], s[2:3] offset:96
; GFX10-NEXT:    global_store_dwordx4 v64, v[60:63], s[2:3] offset:112
; GFX10-NEXT:    s_waitcnt vmcnt(1)
; GFX10-NEXT:    global_store_dwordx4 v64, v[24:27], s[2:3] offset:224
; GFX10-NEXT:    s_waitcnt vmcnt(0)
; GFX10-NEXT:    global_store_dwordx4 v64, v[28:31], s[2:3] offset:240
; GFX10-NEXT:    s_endpgm
;
; GFX11-LABEL: v_insert_v64i32_37:
; GFX11:       ; %bb.0:
; GFX11-NEXT:    s_load_b128 s[0:3], s[0:1], 0x0
; GFX11-NEXT:    v_lshlrev_b32_e32 v64, 8, v0
; GFX11-NEXT:    s_waitcnt lgkmcnt(0)
; GFX11-NEXT:    s_clause 0x9
; GFX11-NEXT:    global_load_b128 v[32:35], v64, s[0:1]
; GFX11-NEXT:    global_load_b128 v[36:39], v64, s[0:1] offset:16
; GFX11-NEXT:    global_load_b128 v[40:43], v64, s[0:1] offset:32
; GFX11-NEXT:    global_load_b128 v[44:47], v64, s[0:1] offset:48
; GFX11-NEXT:    global_load_b128 v[48:51], v64, s[0:1] offset:64
; GFX11-NEXT:    global_load_b128 v[52:55], v64, s[0:1] offset:80
; GFX11-NEXT:    global_load_b128 v[56:59], v64, s[0:1] offset:96
; GFX11-NEXT:    global_load_b128 v[60:63], v64, s[0:1] offset:112
; GFX11-NEXT:    global_load_b128 v[4:7], v64, s[0:1] offset:144
; GFX11-NEXT:    global_load_b128 v[0:3], v64, s[0:1] offset:128
; GFX11-NEXT:    s_waitcnt vmcnt(1)
; GFX11-NEXT:    v_mov_b32_e32 v5, 0x3e7
; GFX11-NEXT:    s_clause 0x5
; GFX11-NEXT:    global_load_b128 v[8:11], v64, s[0:1] offset:160
; GFX11-NEXT:    global_load_b128 v[12:15], v64, s[0:1] offset:176
; GFX11-NEXT:    global_load_b128 v[16:19], v64, s[0:1] offset:192
; GFX11-NEXT:    global_load_b128 v[20:23], v64, s[0:1] offset:208
; GFX11-NEXT:    global_load_b128 v[24:27], v64, s[0:1] offset:224
; GFX11-NEXT:    global_load_b128 v[28:31], v64, s[0:1] offset:240
; GFX11-NEXT:    s_waitcnt vmcnt(6)
; GFX11-NEXT:    s_clause 0x1
; GFX11-NEXT:    global_store_b128 v64, v[0:3], s[2:3] offset:128
; GFX11-NEXT:    global_store_b128 v64, v[4:7], s[2:3] offset:144
; GFX11-NEXT:    s_waitcnt vmcnt(5)
; GFX11-NEXT:    global_store_b128 v64, v[8:11], s[2:3] offset:160
; GFX11-NEXT:    s_waitcnt vmcnt(4)
; GFX11-NEXT:    s_clause 0x8
; GFX11-NEXT:    global_store_b128 v64, v[12:15], s[2:3] offset:176
; GFX11-NEXT:    global_store_b128 v64, v[32:35], s[2:3]
; GFX11-NEXT:    global_store_b128 v64, v[36:39], s[2:3] offset:16
; GFX11-NEXT:    global_store_b128 v64, v[40:43], s[2:3] offset:32
; GFX11-NEXT:    global_store_b128 v64, v[44:47], s[2:3] offset:48
; GFX11-NEXT:    global_store_b128 v64, v[48:51], s[2:3] offset:64
; GFX11-NEXT:    global_store_b128 v64, v[52:55], s[2:3] offset:80
; GFX11-NEXT:    global_store_b128 v64, v[56:59], s[2:3] offset:96
; GFX11-NEXT:    global_store_b128 v64, v[60:63], s[2:3] offset:112
; GFX11-NEXT:    s_waitcnt vmcnt(3)
; GFX11-NEXT:    global_store_b128 v64, v[16:19], s[2:3] offset:192
; GFX11-NEXT:    s_waitcnt vmcnt(2)
; GFX11-NEXT:    global_store_b128 v64, v[20:23], s[2:3] offset:208
; GFX11-NEXT:    s_waitcnt vmcnt(1)
; GFX11-NEXT:    global_store_b128 v64, v[24:27], s[2:3] offset:224
; GFX11-NEXT:    s_waitcnt vmcnt(0)
; GFX11-NEXT:    global_store_b128 v64, v[28:31], s[2:3] offset:240
; GFX11-NEXT:    s_sendmsg sendmsg(MSG_DEALLOC_VGPRS)
; GFX11-NEXT:    s_endpgm
  %id = call i32 @llvm.amdgcn.workitem.id.x()
  %gep.in = getelementptr <64 x i32>, <64 x i32> addrspace(1)* %ptr.in, i32 %id
  %vec = load <64 x i32>, <64 x i32> addrspace(1)* %gep.in
  %insert = insertelement <64 x i32> %vec, i32 999, i32 37
  %gep.out = getelementptr <64 x i32>, <64 x i32> addrspace(1)* %ptr.out, i32 %id
  store <64 x i32> %insert, <64 x i32> addrspace(1)* %gep.out
  ret void
}

declare i32 @llvm.amdgcn.workitem.id.x() #1

attributes #0 = { "amdgpu-flat-work-group-size"="1,256" "amdgpu-waves-per-eu"="1,10" }
attributes #1 = { nounwind readnone speculatable willreturn }