annotate llvm/test/CodeGen/AMDGPU/bitcast-v4f16-v4i16.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 0572611fdcc8
children 1f2b6ac9f198
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 ; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -enable-var-scope %s
anatofuz
parents:
diff changeset
2
anatofuz
parents:
diff changeset
3 ; creating v4i16->v4f16 and v4f16->v4i16 bitcasts in the selection DAG is rather
anatofuz
parents:
diff changeset
4 ; difficult, so this test has to throw in some llvm.amdgcn.wqm to get them
anatofuz
parents:
diff changeset
5
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
6 ; CHECK-LABEL: {{^}}test_to_i16:
150
anatofuz
parents:
diff changeset
7 ; CHECK: s_endpgm
anatofuz
parents:
diff changeset
8 define amdgpu_ps void @test_to_i16(<4 x i32> inreg, <4 x half> inreg) #0 {
anatofuz
parents:
diff changeset
9 %a_tmp = call <4 x half> @llvm.amdgcn.wqm.v4f16(<4 x half> %1)
anatofuz
parents:
diff changeset
10 %a_i16_tmp = bitcast <4 x half> %a_tmp to <4 x i16>
anatofuz
parents:
diff changeset
11 %a_i16 = call <4 x i16> @llvm.amdgcn.wqm.v4i16(<4 x i16> %a_i16_tmp)
anatofuz
parents:
diff changeset
12
anatofuz
parents:
diff changeset
13 %a_i32 = bitcast <4 x i16> %a_i16 to <2 x i32>
anatofuz
parents:
diff changeset
14 call void @llvm.amdgcn.raw.buffer.store.v2i32(<2 x i32> %a_i32, <4 x i32> %0, i32 0, i32 0, i32 0)
anatofuz
parents:
diff changeset
15 ret void
anatofuz
parents:
diff changeset
16 }
anatofuz
parents:
diff changeset
17
173
0572611fdcc8 reorgnization done
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents: 150
diff changeset
18 ; CHECK-LABEL: {{^}}test_to_half:
150
anatofuz
parents:
diff changeset
19 ; CHECK: s_endpgm
anatofuz
parents:
diff changeset
20 define amdgpu_ps void @test_to_half(<4 x i32> inreg, <4 x i16> inreg) #0 {
anatofuz
parents:
diff changeset
21 %a_tmp = call <4 x i16> @llvm.amdgcn.wqm.v4i16(<4 x i16> %1)
anatofuz
parents:
diff changeset
22 %a_half_tmp = bitcast <4 x i16> %a_tmp to <4 x half>
anatofuz
parents:
diff changeset
23 %a_half = call <4 x half> @llvm.amdgcn.wqm.v4f16(<4 x half> %a_half_tmp)
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 %a_i32 = bitcast <4 x half> %a_half to <2 x i32>
anatofuz
parents:
diff changeset
26 call void @llvm.amdgcn.raw.buffer.store.v2i32(<2 x i32> %a_i32, <4 x i32> %0, i32 0, i32 0, i32 0)
anatofuz
parents:
diff changeset
27 ret void
anatofuz
parents:
diff changeset
28 }
anatofuz
parents:
diff changeset
29
anatofuz
parents:
diff changeset
30 declare <4 x half> @llvm.amdgcn.wqm.v4f16(<4 x half>) #1
anatofuz
parents:
diff changeset
31 declare <4 x i16> @llvm.amdgcn.wqm.v4i16(<4 x i16>) #1
anatofuz
parents:
diff changeset
32 declare void @llvm.amdgcn.raw.buffer.store.v2i32(<2 x i32>, <4 x i32>, i32, i32, i32) #0
anatofuz
parents:
diff changeset
33
anatofuz
parents:
diff changeset
34 attributes #0 = { nounwind }
anatofuz
parents:
diff changeset
35 attributes #1 = { nounwind readonly }