check for fastness before merging in DAGCombiner::MergeConsecutiveStores()
authorSanjay Patel <spatel@rotateright.com>
Thu, 3 Sep 2015 15:03:19 +0000 (15:03 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 3 Sep 2015 15:03:19 +0000 (15:03 +0000)
commitdfec7f8eea24c17ebc1489351edbf6804cf858ca
tree9f0ab91136eea90c6531909bf84a6d76fba6699a
parent6f610e174b0391913be5610ec4631e6e1f0e04d1
check for fastness before merging in DAGCombiner::MergeConsecutiveStores()

Use and check the 'IsFast' optional parameter to TLI.allowsMemoryAccess() any time
we have a merged access candidate. Without this patch, we were generating unaligned
16-byte (SSE) memops for x86 targets where those accesses are slow.

This change was mentioned in:
http://reviews.llvm.org/D10662 and
http://reviews.llvm.org/D10905

and will help solve PR21711.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246771 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
lib/Target/AMDGPU/SIISelLowering.cpp
test/CodeGen/X86/dag-merge-fast-accesses.ll [new file with mode: 0644]