summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/BackendUtil.cpp
diff options
context:
space:
mode:
authorNemanja Ivanovic <nemanja.i.ibm@gmail.com>2019-06-05 01:57:57 +0000
committerNemanja Ivanovic <nemanja.i.ibm@gmail.com>2019-06-05 01:57:57 +0000
commit6321c680659118220e954511d2aec3770d3c8154 (patch)
tree65e910a04e47ccdf0ea47960573448ea1fa95a2d /clang/lib/CodeGen/BackendUtil.cpp
parentff918fb487e3f3a161217bd855889d3ea7a9a6e8 (diff)
downloadbcm5719-llvm-6321c680659118220e954511d2aec3770d3c8154.tar.gz
bcm5719-llvm-6321c680659118220e954511d2aec3770d3c8154.zip
Initial support for vectorization using MASSV (IBM MASS vector library)
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
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index c5e56c7a069..ec7c62dae24 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -340,6 +340,9 @@ static TargetLibraryInfoImpl *createTLII(llvm::Triple &TargetTriple,
case CodeGenOptions::Accelerate:
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::Accelerate);
break;
+ case CodeGenOptions::MASSV:
+ TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::MASSV);
+ break;
case CodeGenOptions::SVML:
TLII->addVectorizableFunctionsFromVecLib(TargetLibraryInfoImpl::SVML);
break;
OpenPOWER on IntegriCloud