[PATCH] D49428: [LSV] Look through selects for consecutive addresses

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 19 05:41:00 PDT 2018


arsenm added inline comments.


================
Comment at: lib/Transforms/Vectorize/LoadStoreVectorizer.cpp:674-679
+static ChainID getChainID(const Value *Ptr, const DataLayout &DL) {
+  const Value *ObjPtr = GetUnderlyingObject(Ptr, DL);
+  if (const auto *Sel = dyn_cast<SelectInst>(ObjPtr))
+    return Sel->getCondition();
+  return ObjPtr;
+}
----------------
I'm a bit confused by this ChainID concept. Why is the select condition used for this and not the select itself?


Repository:
  rL LLVM

https://reviews.llvm.org/D49428





More information about the llvm-commits mailing list