17 lines · c
1// RUN: %clang_cc1 -fveclib=Darwin_libsystem_m -triple arm64-apple-darwin %s -target-cpu apple-a7 -vectorize-loops -emit-llvm -O3 -o - | FileCheck %s2 3// REQUIRES: aarch64-registered-target4 5// Make sure -fveclib=Darwin_libsystem_m gets passed through to LLVM as6// expected: a call to _simd_sin_f4 should be generated.7 8extern float sinf(float);9 10// CHECK-LABEL: define{{.*}}@apply_sin11// CHECK: call <4 x float> @_simd_sin_f4(12//13void apply_sin(float *A, float *B, float *C, unsigned N) {14 for (unsigned i = 0; i < N; i++)15 C[i] = sinf(A[i]) + sinf(B[i]);16}17