Lower generic MASSV entries to PowerPC subtarget-specific entries
authorJinsong Ji <jji@us.ibm.com>
Mon, 4 Nov 2019 16:27:23 +0000 (16:27 +0000)
committerJinsong Ji <jji@us.ibm.com>
Mon, 4 Nov 2019 17:17:24 +0000 (17:17 +0000)
commit40d0d4e2335d14a3a70a565304fd7e92c25f178b
treeff18d11a4841aab0317303a09a4711df7244aa78
parentab76cfdd200d35177df2042a1c0c7e86868d01bc
Lower generic MASSV entries to PowerPC subtarget-specific entries

This patch (second of two patches) lowers the generic PowerPC vector
entries to PowerPC subtarget-specific entries.
For instance, the PowerPC generic entry 'cbrtd2_massv' is lowered to
'cbrtd2_P9' or Power9 subtarget.

The first patch 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 overall support for MASS vector library is presented as such in two
patches for ease of review.

Patch by pjeeva01 (Jeeva P.)
Differential Revision: https://reviews.llvm.org/D59883
llvm/include/llvm/Analysis/VecFuncs.def
llvm/lib/Target/PowerPC/CMakeLists.txt
llvm/lib/Target/PowerPC/PPC.h
llvm/lib/Target/PowerPC/PPCLowerMASSVEntries.cpp [new file with mode: 0644]
llvm/lib/Target/PowerPC/PPCTargetMachine.cpp
llvm/test/CodeGen/PowerPC/lower-massv-attr.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/lower-massv.ll [new file with mode: 0644]