brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 2e56c42 Raw
40 lines · plain
1; RUN: llc -mtriple=amdgcn < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s2 3declare float @llvm.amdgcn.rsq.legacy(float) #04 5; FUNC-LABEL: {{^}}rsq_legacy_f32:6; SI: v_rsq_legacy_f32_e32 {{v[0-9]+}}, {{s[0-9]+}}7define amdgpu_kernel void @rsq_legacy_f32(ptr addrspace(1) %out, float %src) #1 {8  %rsq = call float @llvm.amdgcn.rsq.legacy(float %src) #09  store float %rsq, ptr addrspace(1) %out, align 410  ret void11}12 13; TODO: Really these should be constant folded14; FUNC-LABEL: {{^}}rsq_legacy_f32_constant_4.015; SI: v_rsq_legacy_f32_e32 {{v[0-9]+}}, 4.016define amdgpu_kernel void @rsq_legacy_f32_constant_4.0(ptr addrspace(1) %out) #1 {17  %rsq = call float @llvm.amdgcn.rsq.legacy(float 4.0) #018  store float %rsq, ptr addrspace(1) %out, align 419  ret void20}21 22; FUNC-LABEL: {{^}}rsq_legacy_f32_constant_100.023; SI: v_rsq_legacy_f32_e32 {{v[0-9]+}}, 0x42c8000024define amdgpu_kernel void @rsq_legacy_f32_constant_100.0(ptr addrspace(1) %out) #1 {25  %rsq = call float @llvm.amdgcn.rsq.legacy(float 100.0) #026  store float %rsq, ptr addrspace(1) %out, align 427  ret void28}29 30; FUNC-LABEL: {{^}}rsq_legacy_undef_f32:31; SI-NOT: v_rsq_legacy_f3232define amdgpu_kernel void @rsq_legacy_undef_f32(ptr addrspace(1) %out) #1 {33  %rsq = call float @llvm.amdgcn.rsq.legacy(float poison)34  store float %rsq, ptr addrspace(1) %out, align 435  ret void36}37 38attributes #0 = { nounwind readnone }39attributes #1 = { nounwind }40