[PATCH] D98240: [VectorCombine] Simplify to scalar store if only one element updated

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 01:33:13 PDT 2021


lebedev.ri added inline comments.


================
Comment at: llvm/lib/Transforms/Vectorize/VectorCombine.cpp:808
+    Value *GEP = GetElementPtrInst::CreateInBounds(
+        SI->getPointerOperand(), {ConstantInt::get(Idx->getType(), 0), Idx});
+    Builder.Insert(GEP);
----------------
Technically, size of the `insertelement` index doesn't have to match the size of the GEP index,
the latter is controlled in datalayout. I'm not sure if/how we need to deal with that here, however.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98240



More information about the llvm-commits mailing list