diff options
author | Clement Courbet <courbet@google.com> | 2017-10-30 14:19:33 +0000 |
---|---|---|
committer | Clement Courbet <courbet@google.com> | 2017-10-30 14:19:33 +0000 |
commit | b2c3eb8cf18fd749eb6f71314a7f657dcbfb4b84 (patch) | |
tree | d54c47b5bd661ab5a5fa46864fad656e58b0cc72 /llvm/lib/Analysis/TargetTransformInfo.cpp | |
parent | bef1c56724dbb566af0f0ce18fc30cf43ba82fda (diff) | |
download | bcm5719-llvm-b2c3eb8cf18fd749eb6f71314a7f657dcbfb4b84.tar.gz bcm5719-llvm-b2c3eb8cf18fd749eb6f71314a7f657dcbfb4b84.zip |
[CodeGen][ExpandMemcmp] Allow memcmp to expand to vector loads (2).
- Targets that want to support memcmp expansions now return the list of
supported load sizes.
- Expansion codegen does not assume that all power-of-two load sizes
smaller than the max load size are valid. For examples, this is not the
case for x86(32bit)+sse2.
Fixes PR34887.
llvm-svn: 316905
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r-- | llvm/lib/Analysis/TargetTransformInfo.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp index c3185bf2bbd..53bedfe3f63 100644 --- a/llvm/lib/Analysis/TargetTransformInfo.cpp +++ b/llvm/lib/Analysis/TargetTransformInfo.cpp @@ -250,8 +250,9 @@ bool TargetTransformInfo::enableAggressiveInterleaving(bool LoopHasReductions) c return TTIImpl->enableAggressiveInterleaving(LoopHasReductions); } -bool TargetTransformInfo::enableMemCmpExpansion(unsigned &MaxLoadSize) const { - return TTIImpl->enableMemCmpExpansion(MaxLoadSize); +const TargetTransformInfo::MemCmpExpansionOptions * +TargetTransformInfo::enableMemCmpExpansion(bool IsZeroCmp) const { + return TTIImpl->enableMemCmpExpansion(IsZeroCmp); } bool TargetTransformInfo::enableInterleavedAccessVectorization() const { |