[PATCH] D138766: [InstCombine] If loading from small alloca, load whole alloca and perform variable extraction

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 14 13:06:21 PST 2022


nlopes added a comment.

In D138766#3995966 <https://reviews.llvm.org/D138766#3995966>, @lebedev.ri wrote:

> In D138766#3995896 <https://reviews.llvm.org/D138766#3995896>, @nlopes wrote:
>
>> FWIW, I've discovered today that GVN does a similar optimization (but without the freeze..).
>> See here (scroll to the bottom): https://web.ist.utl.pt/nuno.lopes/alive2/index.php?hash=aed14c64378404c9&test=Transforms%2FPhaseOrdering%2FX86%2Fvec-load-combine.ll
>
> That seems to be with constant indexes, though?

True.
So it could use a simple extractelement rather than bit masking.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138766/new/

https://reviews.llvm.org/D138766



More information about the llvm-commits mailing list