1651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s 26bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s 36bcf27bb9a4b5c3f79cb44c0e4654a6d7619ad89Stephen Hines// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64 4560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson 5560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef float float32_t; 6651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef double float64_t; 7b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovertypedef __fp16 float16_t; 8651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#if defined(__aarch64__) 9651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef unsigned char poly8_t; 10651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef unsigned short poly16_t; 11651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#else 12560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef signed char poly8_t; 13560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef short poly16_t; 14651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#endif 15651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef unsigned __INT64_TYPE__ uint64_t; 16560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson 17560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef __attribute__((neon_vector_type(2))) int int32x2_t; 18560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef __attribute__((neon_vector_type(4))) int int32x4_t; 19560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef __attribute__((neon_vector_type(1))) uint64_t uint64x1_t; 20560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef __attribute__((neon_vector_type(2))) uint64_t uint64x2_t; 21560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef __attribute__((neon_vector_type(2))) float32_t float32x2_t; 22560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsontypedef __attribute__((neon_vector_type(4))) float32_t float32x4_t; 23b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovertypedef __attribute__((neon_vector_type(4))) float16_t float16x4_t; 24b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovertypedef __attribute__((neon_vector_type(8))) float16_t float16x8_t; 25651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#ifdef __aarch64__ 26651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef __attribute__((neon_vector_type(2))) float64_t float64x2_t; 27651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#endif 28651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef __attribute__((neon_polyvector_type(16))) poly8_t poly8x16_t; 29651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinestypedef __attribute__((neon_polyvector_type(8))) poly16_t poly16x8_t; 30560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson 31560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 16__simd64_int32_t 32651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 11__Int32x2_t 33560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsonvoid f1(int32x2_t v) { } 34651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 35560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 17__simd128_int32_t 36651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 11__Int32x4_t 37560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsonvoid f2(int32x4_t v) { } 38651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 39560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 17__simd64_uint64_t 40651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 12__Uint64x1_t 41560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsonvoid f3(uint64x1_t v) { } 42651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 43560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 18__simd128_uint64_t 44651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 12__Uint64x2_t 45560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsonvoid f4(uint64x2_t v) { } 46651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 47560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 18__simd64_float32_t 48651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 13__Float32x2_t 49560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsonvoid f5(float32x2_t v) { } 50651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 51560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 19__simd128_float32_t 52651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 13__Float32x4_t 53560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilsonvoid f6(float32x4_t v) { } 54651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 55b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northover// CHECK: 18__simd64_float16_t 56651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 13__Float16x4_t 57b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovervoid f7(float16x4_t v) {} 58651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 59b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northover// CHECK: 19__simd128_float16_t 60651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 13__Float16x8_t 61b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovervoid f8(float16x8_t v) {} 62651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 63560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 17__simd128_poly8_t 64651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 12__Poly8x16_t 65b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovervoid f9(poly8x16_t v) {} 66651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 67560ba1472cb6dc574ad726bbe01c8311f6fa9187Bob Wilson// CHECK: 18__simd128_poly16_t 68651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 12__Poly16x8_t 69b793f0d3448a15277cd6b6cc4ba558ded39a8084Tim Northovervoid f10(poly16x8_t v) {} 70651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines 71651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#ifdef __aarch64__ 72651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines// CHECK-AARCH64: 13__Float64x2_t 73651f13cea278ec967336033dd032faef0e9fc2ecStephen Hinesvoid f11(float64x2_t v) { } 74651f13cea278ec967336033dd032faef0e9fc2ecStephen Hines#endif 75