[PATCH] D93229: [VectorCombine] allow peeking through GEPs when creating a vector load

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 08:46:28 PST 2020


spatel created this revision.
spatel added reviewers: RKSimon, lebedev.ri, xbolva00.
Herald added subscribers: hiraditya, mcrosier.
spatel requested review of this revision.
Herald added a project: LLVM.

This is an enhancement motivated by https://llvm.org/PR16739 (see D92858 <https://reviews.llvm.org/D92858> for another).

We can look through a GEP to find a base pointer that may be safe to use for a vector load. If so, then we shuffle (shift) the necessary vector element over to index 0.

Alive2 proof based on 1 of the regression tests:
https://alive2.llvm.org/ce/z/yPJLkh

The vector translation is independent of endian (verify by changing to leading 'E' in the datalayout string).


https://reviews.llvm.org/D93229

Files:
  llvm/lib/Transforms/Vectorize/VectorCombine.cpp
  llvm/test/Transforms/VectorCombine/X86/load.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93229.311607.patch
Type: text/x-patch
Size: 7171 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201214/9dfc32de/attachment-0001.bin>


More information about the llvm-commits mailing list