Dan Gohman | da594cf | 2009-09-09 00:09:15 +0000 | [diff] [blame^] | 1 | ; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 2 | |
| 3 | define <2 x i32> @vcvt_f32tos32(<2 x float>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 4 | ;CHECK: vcvt_f32tos32: |
| 5 | ;CHECK: vcvt.s32.f32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 6 | %tmp1 = load <2 x float>* %A |
| 7 | %tmp2 = call <2 x i32> @llvm.arm.neon.vcvtfp2fxs.v2i32.v2f32(<2 x float> %tmp1, i32 1) |
| 8 | ret <2 x i32> %tmp2 |
| 9 | } |
| 10 | |
| 11 | define <2 x i32> @vcvt_f32tou32(<2 x float>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 12 | ;CHECK: vcvt_f32tou32: |
| 13 | ;CHECK: vcvt.u32.f32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 14 | %tmp1 = load <2 x float>* %A |
| 15 | %tmp2 = call <2 x i32> @llvm.arm.neon.vcvtfp2fxu.v2i32.v2f32(<2 x float> %tmp1, i32 1) |
| 16 | ret <2 x i32> %tmp2 |
| 17 | } |
| 18 | |
| 19 | define <2 x float> @vcvt_s32tof32(<2 x i32>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 20 | ;CHECK: vcvt_s32tof32: |
| 21 | ;CHECK: vcvt.f32.s32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 22 | %tmp1 = load <2 x i32>* %A |
| 23 | %tmp2 = call <2 x float> @llvm.arm.neon.vcvtfxs2fp.v2f32.v2i32(<2 x i32> %tmp1, i32 1) |
| 24 | ret <2 x float> %tmp2 |
| 25 | } |
| 26 | |
| 27 | define <2 x float> @vcvt_u32tof32(<2 x i32>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 28 | ;CHECK: vcvt_u32tof32: |
| 29 | ;CHECK: vcvt.f32.u32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 30 | %tmp1 = load <2 x i32>* %A |
| 31 | %tmp2 = call <2 x float> @llvm.arm.neon.vcvtfxu2fp.v2f32.v2i32(<2 x i32> %tmp1, i32 1) |
| 32 | ret <2 x float> %tmp2 |
| 33 | } |
| 34 | |
| 35 | declare <2 x i32> @llvm.arm.neon.vcvtfp2fxs.v2i32.v2f32(<2 x float>, i32) nounwind readnone |
| 36 | declare <2 x i32> @llvm.arm.neon.vcvtfp2fxu.v2i32.v2f32(<2 x float>, i32) nounwind readnone |
| 37 | declare <2 x float> @llvm.arm.neon.vcvtfxs2fp.v2f32.v2i32(<2 x i32>, i32) nounwind readnone |
| 38 | declare <2 x float> @llvm.arm.neon.vcvtfxu2fp.v2f32.v2i32(<2 x i32>, i32) nounwind readnone |
| 39 | |
| 40 | define <4 x i32> @vcvtQ_f32tos32(<4 x float>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 41 | ;CHECK: vcvtQ_f32tos32: |
| 42 | ;CHECK: vcvt.s32.f32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 43 | %tmp1 = load <4 x float>* %A |
| 44 | %tmp2 = call <4 x i32> @llvm.arm.neon.vcvtfp2fxs.v4i32.v4f32(<4 x float> %tmp1, i32 1) |
| 45 | ret <4 x i32> %tmp2 |
| 46 | } |
| 47 | |
| 48 | define <4 x i32> @vcvtQ_f32tou32(<4 x float>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 49 | ;CHECK: vcvtQ_f32tou32: |
| 50 | ;CHECK: vcvt.u32.f32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 51 | %tmp1 = load <4 x float>* %A |
| 52 | %tmp2 = call <4 x i32> @llvm.arm.neon.vcvtfp2fxu.v4i32.v4f32(<4 x float> %tmp1, i32 1) |
| 53 | ret <4 x i32> %tmp2 |
| 54 | } |
| 55 | |
| 56 | define <4 x float> @vcvtQ_s32tof32(<4 x i32>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 57 | ;CHECK: vcvtQ_s32tof32: |
| 58 | ;CHECK: vcvt.f32.s32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 59 | %tmp1 = load <4 x i32>* %A |
| 60 | %tmp2 = call <4 x float> @llvm.arm.neon.vcvtfxs2fp.v4f32.v4i32(<4 x i32> %tmp1, i32 1) |
| 61 | ret <4 x float> %tmp2 |
| 62 | } |
| 63 | |
| 64 | define <4 x float> @vcvtQ_u32tof32(<4 x i32>* %A) nounwind { |
Bob Wilson | 4d47c5a | 2009-09-04 00:32:31 +0000 | [diff] [blame] | 65 | ;CHECK: vcvtQ_u32tof32: |
| 66 | ;CHECK: vcvt.f32.u32 |
Bob Wilson | e60fee0 | 2009-06-22 23:27:02 +0000 | [diff] [blame] | 67 | %tmp1 = load <4 x i32>* %A |
| 68 | %tmp2 = call <4 x float> @llvm.arm.neon.vcvtfxu2fp.v4f32.v4i32(<4 x i32> %tmp1, i32 1) |
| 69 | ret <4 x float> %tmp2 |
| 70 | } |
| 71 | |
| 72 | declare <4 x i32> @llvm.arm.neon.vcvtfp2fxs.v4i32.v4f32(<4 x float>, i32) nounwind readnone |
| 73 | declare <4 x i32> @llvm.arm.neon.vcvtfp2fxu.v4i32.v4f32(<4 x float>, i32) nounwind readnone |
| 74 | declare <4 x float> @llvm.arm.neon.vcvtfxs2fp.v4f32.v4i32(<4 x i32>, i32) nounwind readnone |
| 75 | declare <4 x float> @llvm.arm.neon.vcvtfxu2fp.v4f32.v4i32(<4 x i32>, i32) nounwind readnone |
| 76 | |