[PATCH] D76947: [SelectionDAGBuilder][CGP][X86] Move some of SDB's gather/scatter uniform base handling to CGP.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 20:33:21 PDT 2020


craig.topper added a comment.

In D76947#1985459 <https://reviews.llvm.org/D76947#1985459>, @efriedma wrote:

> Maybe a weird question, but should we restrict this to masked gather/scatter operands?  It seems like this should be profitable for any vector GEP to avoid vector operations where possible.


That's probably true. I've wondered if the GEP visitor in SelectionDAGBuilder should only splat when it finds the first vector index instead of for any scalar component of a vector GEP. Of course that means we need to scalarize splat indices earlier so that SelectionDAGBuilder sees them.  Or we could split the GEPs in CGP or earlier like we're doing here. Splitting vector GEPs before LSR could be interesting to give LSR a chance to optimize induction variable uses in the scalar part.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76947





More information about the llvm-commits mailing list