[x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accesses
authorSanjay Patel <spatel@rotateright.com>
Wed, 2 Sep 2015 15:42:49 +0000 (15:42 +0000)
committerSanjay Patel <spatel@rotateright.com>
Wed, 2 Sep 2015 15:42:49 +0000 (15:42 +0000)
commitec4471006306c1239c4c3a10ba083506e11ab53b
tree4c666ac0ad9f5d12542e47f5f181efacfbd6db55
parent3c4c9334b22f59d9ec8728491993ac731e09801a
[x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accesses

This is a continuation of the fix from:
http://reviews.llvm.org/D10662

and discussion in:
http://reviews.llvm.org/D12154

Here, we distinguish slow unaligned SSE (128-bit) accesses from slow unaligned
scalar (64-bit and under) accesses. Other lowering (eg, getOptimalMemOpType)
assumes that unaligned scalar accesses are always ok, so this changes
allowsMisalignedMemoryAccesses() to match that behavior.

Differential Revision: http://reviews.llvm.org/D12543

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246658 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/memcpy-2.ll
test/CodeGen/X86/pr11985.ll