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

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 1 12:22:02 PST 2022


lebedev.ri added a comment.

In D138766#3964585 <https://reviews.llvm.org/D138766#3964585>, @efriedma wrote:

>> I'm not using vector for anything else here
>
> All your testcases involve using the result as a vector?  That seems relevant.

The `call void @use.v8i8(<8 x i8> %init)` things are test artifacts,
common to instcombine and other passes that are well-tested
They have two purposes.

1. mark the value as not having just a single use, but some unknown opaque user
2. escape it (it's value) as a side-effect. This allows e.g. alive2 to complain if somehow the value changes.

So no, i really don't use it as a vector. @spatel will confirm this.

>> Also, we don't really have a way in LLVM IR to represent a shuffle with variable mask.
>
> Not in a target-independent way, no.  Almost every target with a vector unit has some sort of variable shuffle intrinsic, but the semantics aren't consistent.




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