summaryrefslogtreecommitdiff
path: root/test/CodeGen
diff options
context:
space:
mode:
authorAnton Korobeynikov <asl@math.spbu.ru>2012-11-16 21:15:20 +0000
committerAnton Korobeynikov <asl@math.spbu.ru>2012-11-16 21:15:20 +0000
commitb1a392e7c50da5789cf5da879c5b81b72c751c21 (patch)
tree222681be0c5cd56ecb12c7fd738efc1008b3d7d1 /test/CodeGen
parentccc015d4314e966253668deec2b18a0d3e0cf4c0 (diff)
downloadllvm-b1a392e7c50da5789cf5da879c5b81b72c751c21.tar.gz
llvm-b1a392e7c50da5789cf5da879c5b81b72c751c21.tar.bz2
llvm-b1a392e7c50da5789cf5da879c5b81b72c751c21.tar.xz
Make sure FABS on v2f32 and v4f32 is legal on ARM NEON
This fixes PR14359 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168200 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r--test/CodeGen/ARM/fabs-neon.ll17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/fabs-neon.ll b/test/CodeGen/ARM/fabs-neon.ll
new file mode 100644
index 0000000000..614117ff7b
--- /dev/null
+++ b/test/CodeGen/ARM/fabs-neon.ll
@@ -0,0 +1,17 @@
+; RUN: llc < %s -mtriple=armv7-eabi -float-abi=hard -mcpu=cortex-a8 | FileCheck %s
+
+; CHECK: test:
+; CHECK: vabs.f32 q0, q0
+define <4 x float> @test(<4 x float> %a) {
+ %foo = call <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
+ ret <4 x float> %foo
+}
+declare <4 x float> @llvm.fabs.v4f32(<4 x float> %a)
+
+; CHECK: test2:
+; CHECK: vabs.f32 d0, d0
+define <2 x float> @test2(<2 x float> %a) {
+ %foo = call <2 x float> @llvm.fabs.v2f32(<2 x float> %a)
+ ret <2 x float> %foo
+}
+declare <2 x float> @llvm.fabs.v2f32(<2 x float> %a)