brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.0 KiB · 2139a8a Raw
100 lines · cpp
1// RUN: %clang_cc1 -triple armv7-apple-ios -target-feature +neon  %s -emit-llvm -o - | FileCheck %s2// RUN: %clang_cc1 -triple arm64-apple-ios -target-feature +neon %s -emit-llvm -o - | FileCheck %s3// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH644// RUN: %clang_cc1 -triple arm64-linux-gnu -target-feature +neon -target-feature +bf16 %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK-AARCH64-BF165 6typedef float float32_t;7typedef double float64_t;8typedef __fp16 float16_t;9#if defined(__aarch64__)10typedef unsigned char poly8_t;11typedef unsigned short poly16_t;12typedef __mfp8 mfloat8_t;13#else14typedef signed char poly8_t;15typedef short poly16_t;16#endif17typedef unsigned __INT64_TYPE__ uint64_t;18 19#if defined(__ARM_FEATURE_BF16)20typedef __bf16 bfloat16_t;21#endif22 23typedef __attribute__((neon_vector_type(2))) int int32x2_t;24typedef __attribute__((neon_vector_type(4))) int int32x4_t;25typedef __attribute__((neon_vector_type(1))) uint64_t uint64x1_t;26typedef __attribute__((neon_vector_type(2))) uint64_t uint64x2_t;27typedef __attribute__((neon_vector_type(2))) float32_t float32x2_t;28typedef __attribute__((neon_vector_type(4))) float32_t float32x4_t;29typedef __attribute__((neon_vector_type(4))) float16_t float16x4_t;30typedef __attribute__((neon_vector_type(8))) float16_t float16x8_t;31#ifdef __aarch64__32typedef __attribute__((neon_vector_type(2))) float64_t float64x2_t;33typedef __attribute__((neon_vector_type(8))) mfloat8_t mfloat8x8_t;34typedef __attribute__((neon_vector_type(16))) mfloat8_t mfloat8x16_t;35#endif36typedef __attribute__((neon_polyvector_type(16))) poly8_t  poly8x16_t;37typedef __attribute__((neon_polyvector_type(8)))  poly16_t poly16x8_t;38 39#if defined(__ARM_FEATURE_BF16)40typedef __attribute__((neon_vector_type(4))) __bf16 bfloat16x4_t;41#endif42 43// CHECK: 16__simd64_int32_t44// CHECK-AARCH64: 11__Int32x2_t45void f1(int32x2_t v) { }46 47// CHECK: 17__simd128_int32_t48// CHECK-AARCH64: 11__Int32x4_t49void f2(int32x4_t v) { }50 51// CHECK: 17__simd64_uint64_t52// CHECK-AARCH64: 12__Uint64x1_t53void f3(uint64x1_t v) { }54 55// CHECK: 18__simd128_uint64_t56// CHECK-AARCH64: 12__Uint64x2_t57void f4(uint64x2_t v) { }58 59// CHECK: 18__simd64_float32_t60// CHECK-AARCH64: 13__Float32x2_t61void f5(float32x2_t v) { }62 63// CHECK: 19__simd128_float32_t64// CHECK-AARCH64: 13__Float32x4_t65void f6(float32x4_t v) { }66 67// CHECK: 18__simd64_float16_t68// CHECK-AARCH64: 13__Float16x4_t69void f7(float16x4_t v) {}70 71// CHECK: 19__simd128_float16_t72// CHECK-AARCH64: 13__Float16x8_t73void f8(float16x8_t v) {}74 75// CHECK: 17__simd128_poly8_t76// CHECK-AARCH64: 12__Poly8x16_t77void f9(poly8x16_t v) {}78 79// CHECK: 18__simd128_poly16_t80// CHECK-AARCH64: 12__Poly16x8_t81void f10(poly16x8_t v) {}82 83#ifdef __aarch64__84// CHECK-AARCH64: 13__Float64x2_t85void f11(float64x2_t v) { }86#endif87 88#if defined(__ARM_FEATURE_BF16)89// CHECK-AARCH64-BF16: 14__Bfloat16x4_t90void f12(bfloat16x4_t v) {}91#endif92 93 94#ifdef __aarch64__95// CHECK-AARCH64: 13__Mfloat8x8_t96void f13(mfloat8x8_t v) { }97// CHECK-AARCH64: 14__Mfloat8x16_t98void f14(mfloat8x16_t v) { }99#endif100