mirror of
https://github.com/Gericom/teak-llvm.git
synced 2025-06-19 19:45:40 -04:00

Part 2 (the Clang portion) of D59881. This patch (first of two patches) enables the vectorizer to recognize the IBM MASS vector library routines. This patch specifically adds support for recognizing the -vector-library=MASSV option, and defines mappings from IEEE standard scalar math functions to generic PowerPC MASS vector counterparts. For instance, the generic PowerPC MASS vector entry for double-precision cbrt function is __cbrtd2_massv. The second patch will further lower the generic PowerPC vector entries to PowerPC subtarget-specific entries. For instance, the PowerPC generic entry cbrtd2_massv is lowered to cbrtd2_P9 for Power9 subtarget. The overall support for MASS vector library is presented as such in two patches for ease of review. Patch by Jeeva Paudel. Differential revision: https://reviews.llvm.org/D59881 llvm-svn: 362571
20 lines
1.1 KiB
C
20 lines
1.1 KiB
C
// RUN: %clang -### -c -fveclib=none %s 2>&1 | FileCheck -check-prefix CHECK-NOLIB %s
|
|
// RUN: %clang -### -c -fveclib=Accelerate %s 2>&1 | FileCheck -check-prefix CHECK-ACCELERATE %s
|
|
// RUN: %clang -### -c -fveclib=MASSV %s 2>&1 | FileCheck -check-prefix CHECK-MASSV %s
|
|
// RUN: not %clang -c -fveclib=something %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s
|
|
|
|
// CHECK-NOLIB: "-fveclib=none"
|
|
// CHECK-ACCELERATE: "-fveclib=Accelerate"
|
|
// CHECK-MASSV: "-fveclib=MASSV"
|
|
|
|
// CHECK-INVALID: error: invalid value 'something' in '-fveclib=something'
|
|
|
|
// RUN: %clang -fveclib=Accelerate %s -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK %s
|
|
// CHECK-LINK: "-framework" "Accelerate"
|
|
|
|
// RUN: %clang -fveclib=Accelerate %s -nostdlib -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK-NOSTDLIB %s
|
|
// CHECK-LINK-NOSTDLIB-NOT: "-framework" "Accelerate"
|
|
|
|
// RUN: %clang -fveclib=Accelerate %s -nodefaultlibs -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK-NODEFAULTLIBS %s
|
|
// CHECK-LINK-NODEFAULTLIBS-NOT: "-framework" "Accelerate"
|