1; XFAIL: * 2; RUN: llc -march=amdgcn -mcpu=SI < %s 3 4; GCN-LABEL: {{^}}global_truncstore_f64_to_f16: 5; GCN: s_endpgm 6define void @global_truncstore_f64_to_f16(half addrspace(1)* %out, double addrspace(1)* %in) #0 { 7 %val = load double, double addrspace(1)* %in 8 %cvt = fptrunc double %val to half 9 store half %cvt, half addrspace(1)* %out 10 ret void 11} 12 13; GCN-LABEL: {{^}}global_truncstore_v2f64_to_v2f16: 14; GCN: s_endpgm 15define void @global_truncstore_v2f64_to_v2f16(<2 x half> addrspace(1)* %out, <2 x double> addrspace(1)* %in) #0 { 16 %val = load <2 x double>, <2 x double> addrspace(1)* %in 17 %cvt = fptrunc <2 x double> %val to <2 x half> 18 store <2 x half> %cvt, <2 x half> addrspace(1)* %out 19 ret void 20} 21 22; GCN-LABEL: {{^}}global_truncstore_v3f64_to_v3f16: 23; GCN: s_endpgm 24define void @global_truncstore_v3f64_to_v3f16(<3 x half> addrspace(1)* %out, <3 x double> addrspace(1)* %in) #0 { 25 %val = load <3 x double>, <3 x double> addrspace(1)* %in 26 %cvt = fptrunc <3 x double> %val to <3 x half> 27 store <3 x half> %cvt, <3 x half> addrspace(1)* %out 28 ret void 29} 30 31; GCN-LABEL: {{^}}global_truncstore_v4f64_to_v4f16: 32; GCN: s_endpgm 33define void @global_truncstore_v4f64_to_v4f16(<4 x half> addrspace(1)* %out, <4 x double> addrspace(1)* %in) #0 { 34 %val = load <4 x double>, <4 x double> addrspace(1)* %in 35 %cvt = fptrunc <4 x double> %val to <4 x half> 36 store <4 x half> %cvt, <4 x half> addrspace(1)* %out 37 ret void 38} 39 40; GCN-LABEL: {{^}}global_truncstore_v8f64_to_v8f16: 41; GCN: s_endpgm 42define void @global_truncstore_v8f64_to_v8f16(<8 x half> addrspace(1)* %out, <8 x double> addrspace(1)* %in) #0 { 43 %val = load <8 x double>, <8 x double> addrspace(1)* %in 44 %cvt = fptrunc <8 x double> %val to <8 x half> 45 store <8 x half> %cvt, <8 x half> addrspace(1)* %out 46 ret void 47} 48 49; GCN-LABEL: {{^}}global_truncstore_v16f64_to_v16f16: 50; GCN: s_endpgm 51define void @global_truncstore_v16f64_to_v16f16(<16 x half> addrspace(1)* %out, <16 x double> addrspace(1)* %in) #0 { 52 %val = load <16 x double>, <16 x double> addrspace(1)* %in 53 %cvt = fptrunc <16 x double> %val to <16 x half> 54 store <16 x half> %cvt, <16 x half> addrspace(1)* %out 55 ret void 56} 57