[PATCH] D53865: [LoopVectorizer] Improve computation of scalarization overhead.

Jonas Paulsson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 13 23:31:48 PST 2018


jonpa added a comment.

I have found some more potential use for this:

- Currently a load is widened always if possible. I think however if it is known that the user of the load is scalarized by target it might be better to also scalarize the load rather than loading the vector register first to then extract all the elements. This would be true if the extract costs more than 1, I think.
- In addition, if the target knows that the load and user will be scalarized, it can also consider the folding of the load as a memory operand into the user.

So, please take a look anyone :-)

PS. A related subject here is the presence of loop-invariant operands, which will affect CodeGen. Did anyone try passing the Loop* or some kind of LoopInvariant flag for the operands?


https://reviews.llvm.org/D53865





More information about the llvm-commits mailing list