]> granicus.if.org Git - llvm/commit
[CodeGen][ExpandMemcmp] Allow memcmp to expand to vector loads (2).
authorClement Courbet <courbet@google.com>
Mon, 30 Oct 2017 14:19:33 +0000 (14:19 +0000)
committerClement Courbet <courbet@google.com>
Mon, 30 Oct 2017 14:19:33 +0000 (14:19 +0000)
commit4ccf677f27f96e163e8f9417b7a82f63af19df68
tree34332f372a34be30a76dca82985aba123c23cbc1
parent4d7518052e4ab952b6440a0f5d739dec04019526
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@316905 91177308-0d34-0410-b5e6-96231b3b80d8
12 files changed:
include/llvm/Analysis/TargetTransformInfo.h
include/llvm/Analysis/TargetTransformInfoImpl.h
lib/Analysis/TargetTransformInfo.cpp
lib/CodeGen/CodeGenPrepare.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.h
lib/Target/X86/X86TargetTransformInfo.cpp
lib/Target/X86/X86TargetTransformInfo.h
lib/Transforms/Scalar/MergeICmps.cpp
test/CodeGen/X86/memcmp-optsize.ll
test/CodeGen/X86/memcmp.ll
test/Transforms/CodeGenPrepare/X86/memcmp.ll