[PATCH] D111882: [NFC][LoopVectorize] Change getStepVector to take a Value* for the StartIdx

David Sherwood via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 27 03:59:11 PDT 2021


david-arm marked an inline comment as done.
david-arm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoopVectorize.cpp:1122
 
+Value *getRuntimeVFAsFloat(IRBuilder<> &B, Type *FTy, ElementCount VF) {
+  assert(FTy->isFloatingPointTy() && "Expected floating point type!");
----------------
fhahn wrote:
> david-arm wrote:
> > kmclaughlin wrote:
> > > Hi @david-arm, could this be merged with getRuntimeVF? Where we create the sitofp if the type passed to the function is a floating point type?
> > Hi @kmclaughlin, that's a good question! I did this originally with D111873, but one of the reviewers left a comment suggesting it seemed an unusual thing to do.
> nit: could this be static? and outside the `llvm` namespace?
Hi @fhahn, I can change this to static easily enough before merging if that's ok? However, for changing the namespace should that be in a separate follow-on patch? The problem is that `getRuntimeVFAsFloat` calls `getRuntimeVF`, which itself is used outside of this file. It would be a bit strange to have one outside the llvm namespace and one inside I think?


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

https://reviews.llvm.org/D111882



More information about the llvm-commits mailing list