blob: a7979eec52a5619fea0664aef0a223806343b5e5 [file] [log] [blame]
Bob Wilsonad5312a2009-08-04 21:33:22 +00001; RUN: llvm-as < %s | llc -march=arm -mattr=+neon | FileCheck %s
Bob Wilson5bafff32009-06-22 23:27:02 +00002
3define <8 x i8> @vabss8(<8 x i8>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +00004;CHECK: vabss8:
5;CHECK: vabs.s8
Bob Wilson5bafff32009-06-22 23:27:02 +00006 %tmp1 = load <8 x i8>* %A
7 %tmp2 = call <8 x i8> @llvm.arm.neon.vabs.v8i8(<8 x i8> %tmp1)
8 ret <8 x i8> %tmp2
9}
10
11define <4 x i16> @vabss16(<4 x i16>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000012;CHECK: vabss16:
13;CHECK: vabs.s16
Bob Wilson5bafff32009-06-22 23:27:02 +000014 %tmp1 = load <4 x i16>* %A
15 %tmp2 = call <4 x i16> @llvm.arm.neon.vabs.v4i16(<4 x i16> %tmp1)
16 ret <4 x i16> %tmp2
17}
18
19define <2 x i32> @vabss32(<2 x i32>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000020;CHECK: vabss32:
21;CHECK: vabs.s32
Bob Wilson5bafff32009-06-22 23:27:02 +000022 %tmp1 = load <2 x i32>* %A
23 %tmp2 = call <2 x i32> @llvm.arm.neon.vabs.v2i32(<2 x i32> %tmp1)
24 ret <2 x i32> %tmp2
25}
26
27define <2 x float> @vabsf32(<2 x float>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000028;CHECK: vabsf32:
29;CHECK: vabs.f32
Bob Wilson5bafff32009-06-22 23:27:02 +000030 %tmp1 = load <2 x float>* %A
31 %tmp2 = call <2 x float> @llvm.arm.neon.vabsf.v2f32(<2 x float> %tmp1)
32 ret <2 x float> %tmp2
33}
34
35define <16 x i8> @vabsQs8(<16 x i8>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000036;CHECK: vabsQs8:
37;CHECK: vabs.s8
Bob Wilson5bafff32009-06-22 23:27:02 +000038 %tmp1 = load <16 x i8>* %A
39 %tmp2 = call <16 x i8> @llvm.arm.neon.vabs.v16i8(<16 x i8> %tmp1)
40 ret <16 x i8> %tmp2
41}
42
43define <8 x i16> @vabsQs16(<8 x i16>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000044;CHECK: vabsQs16:
45;CHECK: vabs.s16
Bob Wilson5bafff32009-06-22 23:27:02 +000046 %tmp1 = load <8 x i16>* %A
47 %tmp2 = call <8 x i16> @llvm.arm.neon.vabs.v8i16(<8 x i16> %tmp1)
48 ret <8 x i16> %tmp2
49}
50
51define <4 x i32> @vabsQs32(<4 x i32>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000052;CHECK: vabsQs32:
53;CHECK: vabs.s32
Bob Wilson5bafff32009-06-22 23:27:02 +000054 %tmp1 = load <4 x i32>* %A
55 %tmp2 = call <4 x i32> @llvm.arm.neon.vabs.v4i32(<4 x i32> %tmp1)
56 ret <4 x i32> %tmp2
57}
58
59define <4 x float> @vabsQf32(<4 x float>* %A) nounwind {
Bob Wilsonad5312a2009-08-04 21:33:22 +000060;CHECK: vabsQf32:
61;CHECK: vabs.f32
Bob Wilson5bafff32009-06-22 23:27:02 +000062 %tmp1 = load <4 x float>* %A
63 %tmp2 = call <4 x float> @llvm.arm.neon.vabsf.v4f32(<4 x float> %tmp1)
64 ret <4 x float> %tmp2
65}
66
67declare <8 x i8> @llvm.arm.neon.vabs.v8i8(<8 x i8>) nounwind readnone
68declare <4 x i16> @llvm.arm.neon.vabs.v4i16(<4 x i16>) nounwind readnone
69declare <2 x i32> @llvm.arm.neon.vabs.v2i32(<2 x i32>) nounwind readnone
70declare <2 x float> @llvm.arm.neon.vabsf.v2f32(<2 x float>) nounwind readnone
71
72declare <16 x i8> @llvm.arm.neon.vabs.v16i8(<16 x i8>) nounwind readnone
73declare <8 x i16> @llvm.arm.neon.vabs.v8i16(<8 x i16>) nounwind readnone
74declare <4 x i32> @llvm.arm.neon.vabs.v4i32(<4 x i32>) nounwind readnone
75declare <4 x float> @llvm.arm.neon.vabsf.v4f32(<4 x float>) nounwind readnone
76