Matt Arsenault | 41e2f2b | 2014-02-24 21:01:28 +0000 | [diff] [blame] | 1 | ; RUN: llc -march=r600 -mcpu=bonaire < %s | FileCheck -check-prefix=CI %s |
| 2 | |
| 3 | declare double @llvm.trunc.f64(double) nounwind readnone |
| 4 | declare <2 x double> @llvm.trunc.v2f64(<2 x double>) nounwind readnone |
| 5 | declare <3 x double> @llvm.trunc.v3f64(<3 x double>) nounwind readnone |
| 6 | declare <4 x double> @llvm.trunc.v4f64(<4 x double>) nounwind readnone |
| 7 | declare <8 x double> @llvm.trunc.v8f64(<8 x double>) nounwind readnone |
| 8 | declare <16 x double> @llvm.trunc.v16f64(<16 x double>) nounwind readnone |
| 9 | |
| 10 | ; CI-LABEL: @ftrunc_f64: |
| 11 | ; CI: V_TRUNC_F64_e32 |
| 12 | define void @ftrunc_f64(double addrspace(1)* %out, double %x) { |
| 13 | %y = call double @llvm.trunc.f64(double %x) nounwind readnone |
| 14 | store double %y, double addrspace(1)* %out |
| 15 | ret void |
| 16 | } |
| 17 | |
| 18 | ; CI-LABEL: @ftrunc_v2f64: |
| 19 | ; CI: V_TRUNC_F64_e32 |
| 20 | ; CI: V_TRUNC_F64_e32 |
| 21 | define void @ftrunc_v2f64(<2 x double> addrspace(1)* %out, <2 x double> %x) { |
| 22 | %y = call <2 x double> @llvm.trunc.v2f64(<2 x double> %x) nounwind readnone |
| 23 | store <2 x double> %y, <2 x double> addrspace(1)* %out |
| 24 | ret void |
| 25 | } |
| 26 | |
| 27 | ; FIXME-CI-LABEL: @ftrunc_v3f64: |
| 28 | ; FIXME-CI: V_TRUNC_F64_e32 |
| 29 | ; FIXME-CI: V_TRUNC_F64_e32 |
| 30 | ; FIXME-CI: V_TRUNC_F64_e32 |
| 31 | ; define void @ftrunc_v3f64(<3 x double> addrspace(1)* %out, <3 x double> %x) { |
| 32 | ; %y = call <3 x double> @llvm.trunc.v3f64(<3 x double> %x) nounwind readnone |
| 33 | ; store <3 x double> %y, <3 x double> addrspace(1)* %out |
| 34 | ; ret void |
| 35 | ; } |
| 36 | |
| 37 | ; CI-LABEL: @ftrunc_v4f64: |
| 38 | ; CI: V_TRUNC_F64_e32 |
| 39 | ; CI: V_TRUNC_F64_e32 |
| 40 | ; CI: V_TRUNC_F64_e32 |
| 41 | ; CI: V_TRUNC_F64_e32 |
| 42 | define void @ftrunc_v4f64(<4 x double> addrspace(1)* %out, <4 x double> %x) { |
| 43 | %y = call <4 x double> @llvm.trunc.v4f64(<4 x double> %x) nounwind readnone |
| 44 | store <4 x double> %y, <4 x double> addrspace(1)* %out |
| 45 | ret void |
| 46 | } |
| 47 | |
| 48 | ; CI-LABEL: @ftrunc_v8f64: |
| 49 | ; CI: V_TRUNC_F64_e32 |
| 50 | ; CI: V_TRUNC_F64_e32 |
| 51 | ; CI: V_TRUNC_F64_e32 |
| 52 | ; CI: V_TRUNC_F64_e32 |
| 53 | ; CI: V_TRUNC_F64_e32 |
| 54 | ; CI: V_TRUNC_F64_e32 |
| 55 | ; CI: V_TRUNC_F64_e32 |
| 56 | ; CI: V_TRUNC_F64_e32 |
| 57 | define void @ftrunc_v8f64(<8 x double> addrspace(1)* %out, <8 x double> %x) { |
| 58 | %y = call <8 x double> @llvm.trunc.v8f64(<8 x double> %x) nounwind readnone |
| 59 | store <8 x double> %y, <8 x double> addrspace(1)* %out |
| 60 | ret void |
| 61 | } |
| 62 | |
| 63 | ; CI-LABEL: @ftrunc_v16f64: |
| 64 | ; CI: V_TRUNC_F64_e32 |
| 65 | ; CI: V_TRUNC_F64_e32 |
| 66 | ; CI: V_TRUNC_F64_e32 |
| 67 | ; CI: V_TRUNC_F64_e32 |
| 68 | ; CI: V_TRUNC_F64_e32 |
| 69 | ; CI: V_TRUNC_F64_e32 |
| 70 | ; CI: V_TRUNC_F64_e32 |
| 71 | ; CI: V_TRUNC_F64_e32 |
| 72 | ; CI: V_TRUNC_F64_e32 |
| 73 | ; CI: V_TRUNC_F64_e32 |
| 74 | ; CI: V_TRUNC_F64_e32 |
| 75 | ; CI: V_TRUNC_F64_e32 |
| 76 | ; CI: V_TRUNC_F64_e32 |
| 77 | ; CI: V_TRUNC_F64_e32 |
| 78 | ; CI: V_TRUNC_F64_e32 |
| 79 | ; CI: V_TRUNC_F64_e32 |
| 80 | define void @ftrunc_v16f64(<16 x double> addrspace(1)* %out, <16 x double> %x) { |
| 81 | %y = call <16 x double> @llvm.trunc.v16f64(<16 x double> %x) nounwind readnone |
| 82 | store <16 x double> %y, <16 x double> addrspace(1)* %out |
| 83 | ret void |
| 84 | } |