[PATCH] D80885: [VectorCombine] scalarizeBinop - support an all-constant src vector operand

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 31 07:58:20 PDT 2020


RKSimon added a comment.

In D80885#2065299 <https://reviews.llvm.org/D80885#2065299>, @spatel wrote:

> The 1 logic adjustment I'd make here (at least initially) is to add a pattern match to see if the scalar variable is being loaded directly from memory. In that case, we should bail out. A possible enhancement would adjust the cost calc to account for the fact that there is (probably?) no transfer from GPR to vector register in that case.


Thanks @spatel, I'll update later today. Do you mean bail just for the 1 insertion load case or always bail if any loads+insertions are present?

I haven't checked but adding an Instruction arg to getVectorInstrCost would allow us to get more specific costs for load+insert instructions - what would you say if I investigate that instead?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80885





More information about the llvm-commits mailing list