[PATCH] D92317: [LV] ExtractValue instruction costs

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 30 11:43:20 PST 2020


SjoerdMeijer added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:6858
+    // Assume we need 1 instruction to extract a value from a vector.
+    return 1;
   default:
----------------
fhahn wrote:
> SjoerdMeijer wrote:
> > fhahn wrote:
> > > Better to use `TTI.getVectorInstrCost`? And perhaps also handle `InsertValue`?
> > Yeah, cheers, will look/do that.
> Should this also handle `InsertValue` for completeness?
That doesn't seem to be supported by getInstructionCost, which means it returns -1 for InsertValue, which is probably not what we want. So, I think InsertValue needs a bit looking into, which probably best done separately? Although don't mind doing it part of this....


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

https://reviews.llvm.org/D92317



More information about the llvm-commits mailing list