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