[PATCH] D12543: [x86] fix allowsMisalignedMemoryAccesses() for 8-byte and smaller accesses

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 1 15:42:15 PDT 2015


spatel created this revision.
spatel added reviewers: jyknight, zansari, qcolombet, RKSimon, silvas.
spatel added a subscriber: llvm-commits.

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.

The test case changes show that we'll now use unaligned 8-byte load/store with a 64-bit CPU where before we settled for unaligned 4-byte ops.

The overlapping accesses may be a separate bug.

http://reviews.llvm.org/D12543

Files:
  lib/Target/X86/X86ISelLowering.cpp
  test/CodeGen/X86/memcpy-2.ll
  test/CodeGen/X86/pr11985.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12543.33744.patch
Type: text/x-patch
Size: 4702 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150901/24d8c1e6/attachment.bin>


More information about the llvm-commits mailing list