diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2016-07-23 20:41:05 +0000 |
commit | 01095a5d43bbfde13731688ddcf6048ebb8b7721 (patch) | |
tree | 4def12e759965de927d963ac65840d663ef9d1ea /test/CodeGen/AMDGPU/llvm.r600.recipsqrt.ieee.ll | |
parent | f0f4822ed4b66e3579e92a89f368f8fb860e218e (diff) | |
download | src-01095a5d43bbfde13731688ddcf6048ebb8b7721.tar.gz src-01095a5d43bbfde13731688ddcf6048ebb8b7721.zip |
Vendor import of llvm release_39 branch r276489:vendor/llvm/llvm-release_39-r276489
Notes
Notes:
svn path=/vendor/llvm/dist/; revision=303231
svn path=/vendor/llvm/llvm-release_39-r276489/; revision=303232; tag=vendor/llvm/llvm-release_39-r276489
Diffstat (limited to 'test/CodeGen/AMDGPU/llvm.r600.recipsqrt.ieee.ll')
-rw-r--r-- | test/CodeGen/AMDGPU/llvm.r600.recipsqrt.ieee.ll | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/CodeGen/AMDGPU/llvm.r600.recipsqrt.ieee.ll b/test/CodeGen/AMDGPU/llvm.r600.recipsqrt.ieee.ll new file mode 100644 index 000000000000..1d6bff01e662 --- /dev/null +++ b/test/CodeGen/AMDGPU/llvm.r600.recipsqrt.ieee.ll @@ -0,0 +1,28 @@ +; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG %s + +declare float @llvm.r600.recipsqrt.ieee.f32(float) nounwind readnone + +; EG-LABEL: {{^}}recipsqrt.ieee_f32: +; EG: RECIPSQRT_IEEE +define void @recipsqrt.ieee_f32(float addrspace(1)* %out, float %src) nounwind { + %recipsqrt.ieee = call float @llvm.r600.recipsqrt.ieee.f32(float %src) nounwind readnone + store float %recipsqrt.ieee, float addrspace(1)* %out, align 4 + ret void +} + +; TODO: Really these should be constant folded +; EG-LABEL: {{^}}recipsqrt.ieee_f32_constant_4.0 +; EG: RECIPSQRT_IEEE +define void @recipsqrt.ieee_f32_constant_4.0(float addrspace(1)* %out) nounwind { + %recipsqrt.ieee = call float @llvm.r600.recipsqrt.ieee.f32(float 4.0) nounwind readnone + store float %recipsqrt.ieee, float addrspace(1)* %out, align 4 + ret void +} + +; EG-LABEL: {{^}}recipsqrt.ieee_f32_constant_100.0 +; EG: RECIPSQRT_IEEE +define void @recipsqrt.ieee_f32_constant_100.0(float addrspace(1)* %out) nounwind { + %recipsqrt.ieee = call float @llvm.r600.recipsqrt.ieee.f32(float 100.0) nounwind readnone + store float %recipsqrt.ieee, float addrspace(1)* %out, align 4 + ret void +} |