brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · ea0ebf8 Raw
31 lines · plain
1; RUN: llc -mtriple=amdgcn -mcpu=tahiti < %s | FileCheck -check-prefix=GCN %s2; RUN: llc -mtriple=amdgcn -mcpu=fiji < %s | FileCheck -check-prefix=GCN %s3 4declare float @llvm.amdgcn.cubeid(float, float, float) #05declare float @llvm.amdgcn.cubesc(float, float, float) #06declare float @llvm.amdgcn.cubetc(float, float, float) #07declare float @llvm.amdgcn.cubema(float, float, float) #08 9; GCN-LABEL: {{^}}cube:10; GCN-DAG: v_cubeid_f32 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}11; GCN-DAG: v_cubesc_f32 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}12; GCN-DAG: v_cubetc_f32 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}13; GCN-DAG: v_cubema_f32 v{{[0-9]+}}, s{{[0-9]+}}, v{{[0-9]+}}, v{{[0-9]+}}14; GCN: _store_dwordx415define amdgpu_kernel void @cube(ptr addrspace(1) %out, float %a, float %b, float %c) #1 {16  %cubeid = call float @llvm.amdgcn.cubeid(float %a, float %b, float %c)17  %cubesc = call float @llvm.amdgcn.cubesc(float %a, float %b, float %c)18  %cubetc = call float @llvm.amdgcn.cubetc(float %a, float %b, float %c)19  %cubema = call float @llvm.amdgcn.cubema(float %a, float %b, float %c)20 21  %vec0 = insertelement <4 x float> poison, float %cubeid, i32 022  %vec1 = insertelement <4 x float> %vec0, float %cubesc, i32 123  %vec2 = insertelement <4 x float> %vec1, float %cubetc, i32 224  %vec3 = insertelement <4 x float> %vec2, float %cubema, i32 325  store <4 x float> %vec3, ptr addrspace(1) %out26  ret void27}28 29attributes #0 = { nounwind readnone }30attributes #1 = { nounwind }31