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

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun May 31 06:54:49 PDT 2020


spatel added a comment.

I put the PR42174 test into PhaseOrdering, so we can verify that this transform is not undone or done elsewhere (was originally in instcombine with D50992 <https://reviews.llvm.org/D50992>).
I also added tests from D50992 <https://reviews.llvm.org/D50992>, but that still needs work to make it more applicable to x86 cost modeling:
rGe31f2a894a7b <https://reviews.llvm.org/rGe31f2a894a7bec0a64553d615ef40fa36134844e>

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.


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