blob: 0ee99764bcf309bbe8f3b476b433e2db283391e4 [file] [log] [blame]
Dan Gohmanda594cf2009-09-09 00:09:15 +00001; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s
Bob Wilsone60fee02009-06-22 23:27:02 +00002
3define <2 x i32> @vcvt_f32tos32(<2 x float>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +00004;CHECK: vcvt_f32tos32:
5;CHECK: vcvt.s32.f32
Bob Wilsone60fee02009-06-22 23:27:02 +00006 %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
11define <2 x i32> @vcvt_f32tou32(<2 x float>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000012;CHECK: vcvt_f32tou32:
13;CHECK: vcvt.u32.f32
Bob Wilsone60fee02009-06-22 23:27:02 +000014 %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
19define <2 x float> @vcvt_s32tof32(<2 x i32>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000020;CHECK: vcvt_s32tof32:
21;CHECK: vcvt.f32.s32
Bob Wilsone60fee02009-06-22 23:27:02 +000022 %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
27define <2 x float> @vcvt_u32tof32(<2 x i32>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000028;CHECK: vcvt_u32tof32:
29;CHECK: vcvt.f32.u32
Bob Wilsone60fee02009-06-22 23:27:02 +000030 %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
35declare <2 x i32> @llvm.arm.neon.vcvtfp2fxs.v2i32.v2f32(<2 x float>, i32) nounwind readnone
36declare <2 x i32> @llvm.arm.neon.vcvtfp2fxu.v2i32.v2f32(<2 x float>, i32) nounwind readnone
37declare <2 x float> @llvm.arm.neon.vcvtfxs2fp.v2f32.v2i32(<2 x i32>, i32) nounwind readnone
38declare <2 x float> @llvm.arm.neon.vcvtfxu2fp.v2f32.v2i32(<2 x i32>, i32) nounwind readnone
39
40define <4 x i32> @vcvtQ_f32tos32(<4 x float>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000041;CHECK: vcvtQ_f32tos32:
42;CHECK: vcvt.s32.f32
Bob Wilsone60fee02009-06-22 23:27:02 +000043 %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
48define <4 x i32> @vcvtQ_f32tou32(<4 x float>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000049;CHECK: vcvtQ_f32tou32:
50;CHECK: vcvt.u32.f32
Bob Wilsone60fee02009-06-22 23:27:02 +000051 %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
56define <4 x float> @vcvtQ_s32tof32(<4 x i32>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000057;CHECK: vcvtQ_s32tof32:
58;CHECK: vcvt.f32.s32
Bob Wilsone60fee02009-06-22 23:27:02 +000059 %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
64define <4 x float> @vcvtQ_u32tof32(<4 x i32>* %A) nounwind {
Bob Wilson4d47c5a2009-09-04 00:32:31 +000065;CHECK: vcvtQ_u32tof32:
66;CHECK: vcvt.f32.u32
Bob Wilsone60fee02009-06-22 23:27:02 +000067 %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
72declare <4 x i32> @llvm.arm.neon.vcvtfp2fxs.v4i32.v4f32(<4 x float>, i32) nounwind readnone
73declare <4 x i32> @llvm.arm.neon.vcvtfp2fxu.v4i32.v4f32(<4 x float>, i32) nounwind readnone
74declare <4 x float> @llvm.arm.neon.vcvtfxs2fp.v4f32.v4i32(<4 x i32>, i32) nounwind readnone
75declare <4 x float> @llvm.arm.neon.vcvtfxu2fp.v4f32.v4i32(<4 x i32>, i32) nounwind readnone
76