annotate llvm/test/CodeGen/AMDGPU/mad.u16.ll @ 206:f17a3b42b08b

Added tag before-12 for changeset b7591485f4cd
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 07 Jun 2021 21:25:57 +0900
parents 1d019706d866
children 2e18cbf3894f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -mcpu=gfx803 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GFX8 %s
anatofuz
parents:
diff changeset
2 ; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GFX9 %s
anatofuz
parents:
diff changeset
3 ; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=GFX10 %s
anatofuz
parents:
diff changeset
4
anatofuz
parents:
diff changeset
5 ; FIXME: GFX9 should be producing v_mad_u16 instead of v_mad_legacy_u16.
anatofuz
parents:
diff changeset
6
anatofuz
parents:
diff changeset
7 ; GCN-LABEL: {{^}}mad_u16
anatofuz
parents:
diff changeset
8 ; GCN: {{flat|global}}_load_ushort v[[A:[0-9]+]]
anatofuz
parents:
diff changeset
9 ; GCN: {{flat|global}}_load_ushort v[[B:[0-9]+]]
anatofuz
parents:
diff changeset
10 ; GCN: {{flat|global}}_load_ushort v[[C:[0-9]+]]
anatofuz
parents:
diff changeset
11 ; GFX8: v_mad_u16 v[[R:[0-9]+]], v[[A]], v[[B]], v[[C]]
anatofuz
parents:
diff changeset
12 ; GFX9: v_mad_legacy_u16 v[[R:[0-9]+]], v[[A]], v[[B]], v[[C]]
anatofuz
parents:
diff changeset
13 ; GFX10: v_mad_u16 v[[R:[0-9]+]], v[[A]], v[[B]], v[[C]]
anatofuz
parents:
diff changeset
14 ; GCN: {{flat|global}}_store_short v{{\[[0-9]+:[0-9]+\]}}, v[[R]]
anatofuz
parents:
diff changeset
15 ; GCN: s_endpgm
anatofuz
parents:
diff changeset
16 define amdgpu_kernel void @mad_u16(
anatofuz
parents:
diff changeset
17 i16 addrspace(1)* %r,
anatofuz
parents:
diff changeset
18 i16 addrspace(1)* %a,
anatofuz
parents:
diff changeset
19 i16 addrspace(1)* %b,
anatofuz
parents:
diff changeset
20 i16 addrspace(1)* %c) {
anatofuz
parents:
diff changeset
21 entry:
anatofuz
parents:
diff changeset
22 %tid = call i32 @llvm.amdgcn.workitem.id.x()
anatofuz
parents:
diff changeset
23 %a.gep = getelementptr inbounds i16, i16 addrspace(1)* %a, i32 %tid
anatofuz
parents:
diff changeset
24 %b.gep = getelementptr inbounds i16, i16 addrspace(1)* %b, i32 %tid
anatofuz
parents:
diff changeset
25 %c.gep = getelementptr inbounds i16, i16 addrspace(1)* %c, i32 %tid
anatofuz
parents:
diff changeset
26
anatofuz
parents:
diff changeset
27 %a.val = load volatile i16, i16 addrspace(1)* %a.gep
anatofuz
parents:
diff changeset
28 %b.val = load volatile i16, i16 addrspace(1)* %b.gep
anatofuz
parents:
diff changeset
29 %c.val = load volatile i16, i16 addrspace(1)* %c.gep
anatofuz
parents:
diff changeset
30
anatofuz
parents:
diff changeset
31 %m.val = mul i16 %a.val, %b.val
anatofuz
parents:
diff changeset
32 %r.val = add i16 %m.val, %c.val
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 store i16 %r.val, i16 addrspace(1)* %r
anatofuz
parents:
diff changeset
35 ret void
anatofuz
parents:
diff changeset
36 }
anatofuz
parents:
diff changeset
37
anatofuz
parents:
diff changeset
38 declare i32 @llvm.amdgcn.workitem.id.x()