]> granicus.if.org Git - llvm/commit
[X86] EltsFromConsecutiveLoads - support common source loads
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Jul 2019 14:33:25 +0000 (14:33 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 18 Jul 2019 14:33:25 +0000 (14:33 +0000)
commit7dde04014c0d060be90b1c5f106fcae2274c4403
treedabe2fcb113e1490cf0691d2590f157fb4afa605
parent4d09c4f2b4d6c97289fa15affce9b67a7fe33615
[X86] EltsFromConsecutiveLoads - support common source loads

This patch enables us to find the source loads for each element, splitting them into a Load and ByteOffset, and attempts to recognise consecutive loads that are in fact from the same source load.

A helper function, findEltLoadSrc, recurses to find a LoadSDNode and determines the element's byte offset within it. When attempting to match consecutive loads, byte offsetted loads then attempt to matched against a previous load that has already been confirmed to be a consecutive match.

Next step towards PR16739 - after this we just need to account for shuffling/repeated elements to create a vector load + shuffle.

Differential Revision: https://reviews.llvm.org/D64551

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@366441 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/clear_upper_vector_element_bits.ll
test/CodeGen/X86/load-partial.ll