[PATCH] D149893: Rewrite LSV to handle longer chains.

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 03:09:43 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:1012
+      return BasicBlock::reverse_iterator(ChainBegin);
+    else
+      return BasicBlock::iterator(ChainBegin);
----------------
No else after return throughout here


================
Comment at: llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:955
+      if (V->getType() != I->getType()) {
+        V = Builder.CreateBitOrPointerCast(V, I->getType());
+      }
----------------
jlebar wrote:
> arsenm wrote:
> > This shouldn't introduce addrspacecasts 
> True, but it does have the potential to do a bitcast (e.g. i32 -> float) or an inttoptr (e.g. int64 -> ptr).  Is that the wrong function to call?
> 
> Maybe you just meant to put this on the `Value *Bitcast = Builder.CreateBitOrPointerCast(` above -- that one I think can be just a BitCast.  Changed.
Sorry I got confused by the set of cast helpers. I thought these all ended up calling CreatePointerBitCastOrAddrSpaceCast at the end 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149893



More information about the llvm-commits mailing list