[DAGCombiner] Reapply load slicing (192471) with a test that explicitly set sse4...
authorQuentin Colombet <qcolombet@apple.com>
Fri, 11 Oct 2013 18:29:42 +0000 (18:29 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Fri, 11 Oct 2013 18:29:42 +0000 (18:29 +0000)
commit83f743a4d5b4298893adaada0270ff2d832a50c7
tree52875fd50421737fb74516f625b9037f3314eea9
parent4351741a3b36bfe1ac1b385334fc5fa6f6ef5a11
[DAGCombiner] Reapply load slicing (192471) with a test that explicitly set sse4.2 support.
This should fix the buildbots.

Original commit message:
[DAGCombiner] Slice a big load in two loads when the element are next to each
other in memory and the target has paired load and performs post-isel loads
combining.

E.g., this optimization will transform something like this:
a = load i64* addr
b = trunc i64 a to i32
c = lshr i64 a, 32
d = trunc i64 c to i32

into:
b = load i32* addr1
d = load i32* addr2
Where addr1 = addr2 +/- sizeof(i32), if the target supports paired load and
performs post-isel loads combining.

One should overload TargetLowering::hasPairedLoad to provide this information.
The default is false.

<rdar://problem/14477220>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192476 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
test/CodeGen/X86/load-slice.ll [new file with mode: 0644]