blob: 4cafd563685e46010023e8ba170719d8904b76e7 [file] [log] [blame]
Tom Stellard49f8bfd2015-01-06 18:00:21 +00001; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
Matt Arsenault257d48d2014-06-24 22:13:39 +00002; 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
Tom Stellard79243d92014-10-01 17:15:17 +00006; FUNC-LABEL: {{^}}rsq_legacy_f32:
Tom Stellard326d6ec2014-11-05 14:50:53 +00007; SI: v_rsq_legacy_f32_e32
Matt Arsenault257d48d2014-06-24 22:13:39 +00008; 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}