• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG %s
2
3declare float @llvm.r600.recipsqrt.ieee.f32(float) nounwind readnone
4
5; EG-LABEL: {{^}}recipsqrt.ieee_f32:
6; EG: RECIPSQRT_IEEE
7define amdgpu_kernel void @recipsqrt.ieee_f32(float addrspace(1)* %out, float %src) nounwind {
8  %recipsqrt.ieee = call float @llvm.r600.recipsqrt.ieee.f32(float %src) nounwind readnone
9  store float %recipsqrt.ieee, float addrspace(1)* %out, align 4
10  ret void
11}
12
13; TODO: Really these should be constant folded
14; EG-LABEL: {{^}}recipsqrt.ieee_f32_constant_4.0
15; EG: RECIPSQRT_IEEE
16define amdgpu_kernel void @recipsqrt.ieee_f32_constant_4.0(float addrspace(1)* %out) nounwind {
17  %recipsqrt.ieee = call float @llvm.r600.recipsqrt.ieee.f32(float 4.0) nounwind readnone
18  store float %recipsqrt.ieee, float addrspace(1)* %out, align 4
19  ret void
20}
21
22; EG-LABEL: {{^}}recipsqrt.ieee_f32_constant_100.0
23; EG: RECIPSQRT_IEEE
24define amdgpu_kernel void @recipsqrt.ieee_f32_constant_100.0(float addrspace(1)* %out) nounwind {
25  %recipsqrt.ieee = call float @llvm.r600.recipsqrt.ieee.f32(float 100.0) nounwind readnone
26  store float %recipsqrt.ieee, float addrspace(1)* %out, align 4
27  ret void
28}
29