• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
3
4declare float @llvm.AMDGPU.legacy.rsq(float) nounwind readnone
5
6; FUNC-LABEL: {{^}}rsq_legacy_f32:
7; SI: v_rsq_legacy_f32_e32
8; EG: RECIPSQRT_IEEE
9define void @rsq_legacy_f32(float addrspace(1)* %out, float %src) nounwind {
10  %rsq = call float @llvm.AMDGPU.legacy.rsq(float %src) nounwind readnone
11  store float %rsq, float addrspace(1)* %out, align 4
12  ret void
13}
14