[PATCH] D123234: [X86] `lowerBuildVectorAsBroadcast()`: with AVX2, allow i64->XMM broadcasts from constant pool

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 05:55:30 PDT 2022


lebedev.ri added a comment.

In D123234#3435368 <https://reviews.llvm.org/D123234#3435368>, @RKSimon wrote:

> This is why I don't think we want to perform too much of this in the DAG - we quickly get to cases where the decision between broadcast vs vector load of constants can't be easily determined - value tracking, multiple uses, hoisting, lost folds, spilling etc. all get affected.
>
> A while ago I was investigating the use of VPMOVSX/ZX to reduce the size of the constant pool, and hit many of the same problems. And constant rematerialization would be the same if we ever get to that point.
>
> There's probably some minor further tweaks we can do (more hasOneUse checks?), but really we need to think about performing less in the DAG, and more in later passes.

I see.
Please confirm my understanding, you are suggesting that we should generalize `*SET0`/`*SETALLONES` pseudo-instructions
into `MATERIALIZE` pseudo-instruction, with much the same handling of expanding it post-RA (`expandPostRAPseudo()`)?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123234



More information about the llvm-commits mailing list