Tom Stellard | b249b75 | 2013-08-16 23:51:33 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=r600 -mcpu=redwood | FileCheck %s --check-prefix=R600-CHECK |
| 2 | ; RUN: llc < %s -march=r600 -mcpu=SI | FileCheck %s --check-prefix=SI-CHECK |
| 3 | |
| 4 | ; R600-CHECK: @f32 |
| 5 | ; R600-CHECK: RNDNE |
| 6 | ; SI-CHECK: @f32 |
| 7 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 8 | define void @f32(float addrspace(1)* %out, float %in) { |
| 9 | entry: |
| 10 | %0 = call float @llvm.rint.f32(float %in) |
| 11 | store float %0, float addrspace(1)* %out |
| 12 | ret void |
| 13 | } |
| 14 | |
| 15 | ; R600-CHECK: @v2f32 |
| 16 | ; R600-CHECK: RNDNE |
| 17 | ; R600-CHECK: RNDNE |
| 18 | ; SI-CHECK: @v2f32 |
| 19 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 20 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 21 | define void @v2f32(<2 x float> addrspace(1)* %out, <2 x float> %in) { |
| 22 | entry: |
| 23 | %0 = call <2 x float> @llvm.rint.v2f32(<2 x float> %in) |
| 24 | store <2 x float> %0, <2 x float> addrspace(1)* %out |
| 25 | ret void |
| 26 | } |
| 27 | |
| 28 | ; R600-CHECK: @v4f32 |
| 29 | ; R600-CHECK: RNDNE |
| 30 | ; R600-CHECK: RNDNE |
| 31 | ; R600-CHECK: RNDNE |
| 32 | ; R600-CHECK: RNDNE |
| 33 | ; SI-CHECK: @v4f32 |
| 34 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 35 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 36 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 37 | ; SI-CHECK: V_RNDNE_F32_e32 |
| 38 | define void @v4f32(<4 x float> addrspace(1)* %out, <4 x float> %in) { |
| 39 | entry: |
| 40 | %0 = call <4 x float> @llvm.rint.v4f32(<4 x float> %in) |
| 41 | store <4 x float> %0, <4 x float> addrspace(1)* %out |
| 42 | ret void |
| 43 | } |
| 44 | |
| 45 | ; Function Attrs: nounwind readonly |
| 46 | declare float @llvm.rint.f32(float) #0 |
| 47 | |
| 48 | ; Function Attrs: nounwind readonly |
| 49 | declare <2 x float> @llvm.rint.v2f32(<2 x float>) #0 |
| 50 | |
| 51 | ; Function Attrs: nounwind readonly |
| 52 | declare <4 x float> @llvm.rint.v4f32(<4 x float>) #0 |
| 53 | |
| 54 | attributes #0 = { nounwind readonly } |