summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDavid Zarzycki <dave@znu.io>2019-10-31 12:30:53 +0200
committerDavid Zarzycki <dave@znu.io>2019-10-31 20:07:07 +0200
commit0e252ae19ff8d99a59d64442c38eeafa5825d441 (patch)
treedfff213a4c2d20810cdc8fcb0e642b0ec07112f5 /llvm/lib
parent1b57f0213f32cf54e132b4bc2361d8a41174d6b8 (diff)
downloadbcm5719-llvm-0e252ae19ff8d99a59d64442c38eeafa5825d441.tar.gz
bcm5719-llvm-0e252ae19ff8d99a59d64442c38eeafa5825d441.zip
[X86] Enable YMM memcmp with AVX1
Update TargetTransformInfo to allow AVX1 to use YMM registers for memcmp. This is a follow up to D68632 which enabled XOR compares which made this possible. https://reviews.llvm.org/D69658
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 2f899b3947b..afbe965ff4f 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -3444,10 +3444,9 @@ X86TTIImpl::enableMemCmpExpansion(bool OptSize, bool IsZeroCmp) const {
// version is not as fast for three way compare (see #33329).
const unsigned PreferredWidth = ST->getPreferVectorWidth();
if (PreferredWidth >= 512 && ST->hasAVX512()) Options.LoadSizes.push_back(64);
- if (PreferredWidth >= 256 && ST->hasAVX2()) Options.LoadSizes.push_back(32);
+ if (PreferredWidth >= 256 && ST->hasAVX()) Options.LoadSizes.push_back(32);
if (PreferredWidth >= 128 && ST->hasSSE2()) Options.LoadSizes.push_back(16);
- // All GPR and vector loads can be unaligned. SIMD compare requires integer
- // vectors (SSE2/AVX2).
+ // All GPR and vector loads can be unaligned.
Options.AllowOverlappingLoads = true;
}
if (ST->is64Bit()) {
OpenPOWER on IntegriCloud