diff options
author | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2015-10-25 15:37:55 +0000 |
---|---|---|
committer | Elena Demikhovsky <elena.demikhovsky@intel.com> | 2015-10-25 15:37:55 +0000 |
commit | 092858588a1c7f5019756e3cc75539396088b348 (patch) | |
tree | f9c57213eb27b41bcc3fd6eac6a64cc529019f8c /llvm/lib/Analysis/TargetTransformInfo.cpp | |
parent | be187a0a1a7754f4e07547ce969c27fcc973f2ce (diff) | |
download | llvm-092858588a1c7f5019756e3cc75539396088b348.zip llvm-092858588a1c7f5019756e3cc75539396088b348.tar.gz llvm-092858588a1c7f5019756e3cc75539396088b348.tar.bz2 |
Scalarizer for masked.gather and masked.scatter intrinsics.
When the target does not support these intrinsics they should be converted to a chain of scalar load or store operations.
If the mask is not constant, the scalarizer will build a chain of conditional basic blocks.
I added isLegalMaskedGather() isLegalMaskedScatter() APIs.
Differential Revision: http://reviews.llvm.org/D13722
llvm-svn: 251237
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetTransformInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index 427e1ed..f82af75 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -121,6 +121,14 @@ bool TargetTransformInfo::isLegalMaskedLoad(Type *DataType) const { return TTIImpl->isLegalMaskedLoad(DataType); } +bool TargetTransformInfo::isLegalMaskedGather(Type *DataType) const { + return TTIImpl->isLegalMaskedGather(DataType); +} + +bool TargetTransformInfo::isLegalMaskedScatter(Type *DataType) const { + return TTIImpl->isLegalMaskedGather(DataType); +} + int TargetTransformInfo::getScalingFactorCost(Type *Ty, GlobalValue *BaseGV, int64_t BaseOffset, bool HasBaseReg, |