1*67e74705SXin Li // RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s 2*67e74705SXin Li // RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s 3*67e74705SXin Li // RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64 4*67e74705SXin Li 5*67e74705SXin Li typedef float float32_t; 6*67e74705SXin Li typedef double float64_t; 7*67e74705SXin Li typedef __fp16 float16_t; 8*67e74705SXin Li #if defined(__aarch64__) 9*67e74705SXin Li typedef unsigned char poly8_t; 10*67e74705SXin Li typedef unsigned short poly16_t; 11*67e74705SXin Li #else 12*67e74705SXin Li typedef signed char poly8_t; 13*67e74705SXin Li typedef short poly16_t; 14*67e74705SXin Li #endif 15*67e74705SXin Li typedef unsigned __INT64_TYPE__ uint64_t; 16*67e74705SXin Li 17*67e74705SXin Li typedef __attribute__((neon_vector_type(2))) int int32x2_t; 18*67e74705SXin Li typedef __attribute__((neon_vector_type(4))) int int32x4_t; 19*67e74705SXin Li typedef __attribute__((neon_vector_type(1))) uint64_t uint64x1_t; 20*67e74705SXin Li typedef __attribute__((neon_vector_type(2))) uint64_t uint64x2_t; 21*67e74705SXin Li typedef __attribute__((neon_vector_type(2))) float32_t float32x2_t; 22*67e74705SXin Li typedef __attribute__((neon_vector_type(4))) float32_t float32x4_t; 23*67e74705SXin Li typedef __attribute__((neon_vector_type(4))) float16_t float16x4_t; 24*67e74705SXin Li typedef __attribute__((neon_vector_type(8))) float16_t float16x8_t; 25*67e74705SXin Li #ifdef __aarch64__ 26*67e74705SXin Li typedef __attribute__((neon_vector_type(2))) float64_t float64x2_t; 27*67e74705SXin Li #endif 28*67e74705SXin Li typedef __attribute__((neon_polyvector_type(16))) poly8_t poly8x16_t; 29*67e74705SXin Li typedef __attribute__((neon_polyvector_type(8))) poly16_t poly16x8_t; 30*67e74705SXin Li 31*67e74705SXin Li // CHECK: 16__simd64_int32_t 32*67e74705SXin Li // CHECK-AARCH64: 11__Int32x2_t f1(int32x2_t v)33*67e74705SXin Livoid f1(int32x2_t v) { } 34*67e74705SXin Li 35*67e74705SXin Li // CHECK: 17__simd128_int32_t 36*67e74705SXin Li // CHECK-AARCH64: 11__Int32x4_t f2(int32x4_t v)37*67e74705SXin Livoid f2(int32x4_t v) { } 38*67e74705SXin Li 39*67e74705SXin Li // CHECK: 17__simd64_uint64_t 40*67e74705SXin Li // CHECK-AARCH64: 12__Uint64x1_t f3(uint64x1_t v)41*67e74705SXin Livoid f3(uint64x1_t v) { } 42*67e74705SXin Li 43*67e74705SXin Li // CHECK: 18__simd128_uint64_t 44*67e74705SXin Li // CHECK-AARCH64: 12__Uint64x2_t f4(uint64x2_t v)45*67e74705SXin Livoid f4(uint64x2_t v) { } 46*67e74705SXin Li 47*67e74705SXin Li // CHECK: 18__simd64_float32_t 48*67e74705SXin Li // CHECK-AARCH64: 13__Float32x2_t f5(float32x2_t v)49*67e74705SXin Livoid f5(float32x2_t v) { } 50*67e74705SXin Li 51*67e74705SXin Li // CHECK: 19__simd128_float32_t 52*67e74705SXin Li // CHECK-AARCH64: 13__Float32x4_t f6(float32x4_t v)53*67e74705SXin Livoid f6(float32x4_t v) { } 54*67e74705SXin Li 55*67e74705SXin Li // CHECK: 18__simd64_float16_t 56*67e74705SXin Li // CHECK-AARCH64: 13__Float16x4_t f7(float16x4_t v)57*67e74705SXin Livoid f7(float16x4_t v) {} 58*67e74705SXin Li 59*67e74705SXin Li // CHECK: 19__simd128_float16_t 60*67e74705SXin Li // CHECK-AARCH64: 13__Float16x8_t f8(float16x8_t v)61*67e74705SXin Livoid f8(float16x8_t v) {} 62*67e74705SXin Li 63*67e74705SXin Li // CHECK: 17__simd128_poly8_t 64*67e74705SXin Li // CHECK-AARCH64: 12__Poly8x16_t f9(poly8x16_t v)65*67e74705SXin Livoid f9(poly8x16_t v) {} 66*67e74705SXin Li 67*67e74705SXin Li // CHECK: 18__simd128_poly16_t 68*67e74705SXin Li // CHECK-AARCH64: 12__Poly16x8_t f10(poly16x8_t v)69*67e74705SXin Livoid f10(poly16x8_t v) {} 70*67e74705SXin Li 71*67e74705SXin Li #ifdef __aarch64__ 72*67e74705SXin Li // CHECK-AARCH64: 13__Float64x2_t f11(float64x2_t v)73*67e74705SXin Livoid f11(float64x2_t v) { } 74*67e74705SXin Li #endif 75