1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s 2; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=GCN -check-prefix=FUNC %s 3; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=EGCM -check-prefix=FUNC %s 4; RUN: llc -march=r600 -mcpu=cayman -verify-machineinstrs < %s | FileCheck -check-prefix=CM -check-prefix=EGCM -check-prefix=FUNC %s 5 6declare float @llvm.convert.from.fp16.f32(i16) nounwind readnone 7 8; FUNC-LABEL: {{^}}test_convert_fp16_to_fp32: 9; GCN: buffer_load_ushort [[VAL:v[0-9]+]] 10; GCN: v_cvt_f32_f16_e32 [[RESULT:v[0-9]+]], [[VAL]] 11; GCN: buffer_store_dword [[RESULT]] 12 13; EG: MEM_RAT_CACHELESS STORE_RAW [[RES:T[0-9]+\.[XYZW]]] 14; CM: MEM_RAT_CACHELESS STORE_DWORD [[RES:T[0-9]+\.[XYZW]]] 15; EGCM: VTX_READ_16 [[VAL:T[0-9]+\.[XYZW]]] 16; EGCM: FLT16_TO_FLT32{{[ *]*}}[[RES]], [[VAL]] 17define amdgpu_kernel void @test_convert_fp16_to_fp32(float addrspace(1)* noalias %out, i16 addrspace(1)* noalias %in) nounwind { 18 %val = load i16, i16 addrspace(1)* %in, align 2 19 %cvt = call float @llvm.convert.from.fp16.f32(i16 %val) nounwind readnone 20 store float %cvt, float addrspace(1)* %out, align 4 21 ret void 22} 23