[PATCH] D101900: [InstCombine] Fold extractelement + vector GEP with one use

Caroline via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 6 05:34:23 PDT 2021


CarolineConcatto added a comment.

Hey @david-arm,

I had a looks, but not too sure I have more comments than the ones I've added.



================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp:450
+          if (VecType->getElementType() == GEP->getPointerOperandType()) {
+            assert(isa<VectorType>(IdxType) &&
+                   EC == cast<VectorType>(IdxType)->getElementCount());
----------------
Can you add a message when asserting?


================
Comment at: llvm/test/Transforms/InstCombine/gep-vector-indices.ll:92
+
+; Negative tests
+
----------------
Should we add a negative test for this too:
//  3. We have a vector of pointers and a vector of indices.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101900



More information about the llvm-commits mailing list