[PATCH] D125918: [LV] Improve register pressure estimate at high VFs

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 19 02:55:44 PDT 2022


sdesmalen accepted this revision.
sdesmalen added a comment.
This revision is now accepted and ready to land.

This change looks right to me.

I do think there is a related issue exposed by your test. The cost-model for the PHI node is not accurate, because it suggests the cost of the PHI itself is `0` but because the copy is being scalarized in CopyToReg/CopyFromReg the cost is actually really high. Perhaps we can update `getCFInstrCost` with some checks to see if the vector type requires Promotion + Splitting and if so, return a scalarization cost for the PHI node instead. We can also just fix the codegen itself of course, but I suspect that may be more work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D125918



More information about the llvm-commits mailing list