brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · 392a99f Raw
43 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=GCN %s2; RUN: not llc -mtriple=amdgcn -mcpu=fiji < %s 2>&1 | FileCheck -check-prefix=ERROR %s3 4; ERROR: error: <unknown>:0:0: in function rcp_legacy_f32 void (ptr addrspace(1), float): intrinsic not supported on subtarget5 6declare float @llvm.amdgcn.rcp.legacy(float) #07 8; GCN-LABEL: {{^}}rcp_legacy_f32:9; GCN: v_rcp_legacy_f32_e32 {{v[0-9]+}}, {{s[0-9]+}}10define amdgpu_kernel void @rcp_legacy_f32(ptr addrspace(1) %out, float %src) #1 {11  %rcp = call float @llvm.amdgcn.rcp.legacy(float %src) #012  store float %rcp, ptr addrspace(1) %out, align 413  ret void14}15 16; TODO: Really these should be constant folded17; GCN-LABEL: {{^}}rcp_legacy_f32_constant_4.018; GCN: v_rcp_legacy_f32_e32 {{v[0-9]+}}, 4.019define amdgpu_kernel void @rcp_legacy_f32_constant_4.0(ptr addrspace(1) %out) #1 {20  %rcp = call float @llvm.amdgcn.rcp.legacy(float 4.0) #021  store float %rcp, ptr addrspace(1) %out, align 422  ret void23}24 25; GCN-LABEL: {{^}}rcp_legacy_f32_constant_100.026; GCN: v_rcp_legacy_f32_e32 {{v[0-9]+}}, 0x42c8000027define amdgpu_kernel void @rcp_legacy_f32_constant_100.0(ptr addrspace(1) %out) #1 {28  %rcp = call float @llvm.amdgcn.rcp.legacy(float 100.0) #029  store float %rcp, ptr addrspace(1) %out, align 430  ret void31}32 33; GCN-LABEL: {{^}}rcp_legacy_undef_f32:34; GCN-NOT: v_rcp_legacy_f3235define amdgpu_kernel void @rcp_legacy_undef_f32(ptr addrspace(1) %out) #1 {36  %rcp = call float @llvm.amdgcn.rcp.legacy(float poison)37  store float %rcp, ptr addrspace(1) %out, align 438  ret void39}40 41attributes #0 = { nounwind readnone }42attributes #1 = { nounwind }43