blob: 9bdddb72696e3e181d2babec6164c19efc1f9317 [file] [log] [blame]
Jim Grosbachf7947052012-07-09 18:34:21 +00001// REQUIRES: arm-registered-target
Daniel Dunbar8aa87c72010-09-23 01:54:28 +00002// RUN: %clang_cc1 -triple thumbv7-apple-darwin9 \
3// RUN: -target-abi apcs-gnu \
4// RUN: -target-cpu cortex-a8 \
5// RUN: -mfloat-abi soft \
6// RUN: -target-feature +soft-float-abi \
Daniel Dunbar7bb1d232010-09-23 04:40:10 +00007// RUN: -ffreestanding \
Daniel Dunbar8aa87c72010-09-23 01:54:28 +00008// RUN: -emit-llvm -w -o - %s | FileCheck %s
9
10#include <arm_neon.h>
11
John McCall410ffb22011-08-25 23:04:34 +000012// CHECK: define void @f0(%struct.int8x16x2_t* noalias sret %agg.result, <16 x i8> %{{.*}}, <16 x i8> %{{.*}})
Bob Wilson8e8c7e02010-11-17 00:44:53 +000013int8x16x2_t f0(int8x16_t a0, int8x16_t a1) {
14 return vzipq_s8(a0, a1);
Daniel Dunbar8aa87c72010-09-23 01:54:28 +000015}
Daniel Dunbarf554b1c2010-09-23 01:54:32 +000016
17// Test direct vector passing.
18
19typedef float T_float32x2 __attribute__ ((__vector_size__ (8)));
20typedef float T_float32x4 __attribute__ ((__vector_size__ (16)));
21typedef float T_float32x8 __attribute__ ((__vector_size__ (32)));
22typedef float T_float32x16 __attribute__ ((__vector_size__ (64)));
23
24// CHECK: define <2 x float> @f1_0(<2 x float> %{{.*}})
25T_float32x2 f1_0(T_float32x2 a0) { return a0; }
26// CHECK: define <4 x float> @f1_1(<4 x float> %{{.*}})
27T_float32x4 f1_1(T_float32x4 a0) { return a0; }
John McCall410ffb22011-08-25 23:04:34 +000028// CHECK: define void @f1_2(<8 x float>* noalias sret %{{.*}}, <8 x float> %{{.*}})
Daniel Dunbarf554b1c2010-09-23 01:54:32 +000029T_float32x8 f1_2(T_float32x8 a0) { return a0; }
John McCall410ffb22011-08-25 23:04:34 +000030// CHECK: define void @f1_3(<16 x float>* noalias sret %{{.*}}, <16 x float> %{{.*}})
Daniel Dunbarf554b1c2010-09-23 01:54:32 +000031T_float32x16 f1_3(T_float32x16 a0) { return a0; }