1 ; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
3 ; GCN-LABEL: {{^}}global_truncstore_f64_to_f16:
5 define amdgpu_kernel void @global_truncstore_f64_to_f16(half addrspace(1)* %out, double addrspace(1)* %in) #0 {
6 %val = load double, double addrspace(1)* %in
7 %cvt = fptrunc double %val to half
8 store half %cvt, half addrspace(1)* %out
12 ; GCN-LABEL: {{^}}global_truncstore_v2f64_to_v2f16:
14 define amdgpu_kernel void @global_truncstore_v2f64_to_v2f16(<2 x half> addrspace(1)* %out, <2 x double> addrspace(1)* %in) #0 {
15 %val = load <2 x double>, <2 x double> addrspace(1)* %in
16 %cvt = fptrunc <2 x double> %val to <2 x half>
17 store <2 x half> %cvt, <2 x half> addrspace(1)* %out
21 ; GCN-LABEL: {{^}}global_truncstore_v3f64_to_v3f16:
23 define amdgpu_kernel void @global_truncstore_v3f64_to_v3f16(<3 x half> addrspace(1)* %out, <3 x double> addrspace(1)* %in) #0 {
24 %val = load <3 x double>, <3 x double> addrspace(1)* %in
25 %cvt = fptrunc <3 x double> %val to <3 x half>
26 store <3 x half> %cvt, <3 x half> addrspace(1)* %out
30 ; GCN-LABEL: {{^}}global_truncstore_v4f64_to_v4f16:
32 define amdgpu_kernel void @global_truncstore_v4f64_to_v4f16(<4 x half> addrspace(1)* %out, <4 x double> addrspace(1)* %in) #0 {
33 %val = load <4 x double>, <4 x double> addrspace(1)* %in
34 %cvt = fptrunc <4 x double> %val to <4 x half>
35 store <4 x half> %cvt, <4 x half> addrspace(1)* %out
39 ; GCN-LABEL: {{^}}global_truncstore_v8f64_to_v8f16:
41 define amdgpu_kernel void @global_truncstore_v8f64_to_v8f16(<8 x half> addrspace(1)* %out, <8 x double> addrspace(1)* %in) #0 {
42 %val = load <8 x double>, <8 x double> addrspace(1)* %in
43 %cvt = fptrunc <8 x double> %val to <8 x half>
44 store <8 x half> %cvt, <8 x half> addrspace(1)* %out
48 ; GCN-LABEL: {{^}}global_truncstore_v16f64_to_v16f16:
50 define amdgpu_kernel void @global_truncstore_v16f64_to_v16f16(<16 x half> addrspace(1)* %out, <16 x double> addrspace(1)* %in) #0 {
51 %val = load <16 x double>, <16 x double> addrspace(1)* %in
52 %cvt = fptrunc <16 x double> %val to <16 x half>
53 store <16 x half> %cvt, <16 x half> addrspace(1)* %out