R600/SI: Enable all tests that pass on VI without changes
[oota-llvm.git] / test / CodeGen / R600 / llvm.AMDGPU.fract.ll
1 ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
3 ; RUN: llc -march=r600 -mcpu=cypress -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
4
5 declare float @llvm.AMDGPU.fract.f32(float) nounwind readnone
6
7 ; Legacy name
8 declare float @llvm.AMDIL.fraction.f32(float) nounwind readnone
9
10 ; FUNC-LABEL: {{^}}fract_f32:
11 ; SI: v_fract_f32
12 ; EG: FRACT
13 define void @fract_f32(float addrspace(1)* %out, float addrspace(1)* %src) nounwind {
14   %val = load float addrspace(1)* %src, align 4
15   %fract = call float @llvm.AMDGPU.fract.f32(float %val) nounwind readnone
16   store float %fract, float addrspace(1)* %out, align 4
17   ret void
18 }
19
20 ; FUNC-LABEL: {{^}}fract_f32_legacy_amdil:
21 ; SI: v_fract_f32
22 ; EG: FRACT
23 define void @fract_f32_legacy_amdil(float addrspace(1)* %out, float addrspace(1)* %src) nounwind {
24   %val = load float addrspace(1)* %src, align 4
25   %fract = call float @llvm.AMDIL.fraction.f32(float %val) nounwind readnone
26   store float %fract, float addrspace(1)* %out, align 4
27   ret void
28 }