[PATCH] D39911: [SelectionDAG] Teach SelectionDAGBuilder's getUniformBase for gather/scatter handling to accept GEPs with more than 2 operands if the middle operands are all 0s

Elena Demikhovsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 13:09:59 PST 2017


delena added inline comments.


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:3874
   const GetElementPtrInst *GEP = dyn_cast<GetElementPtrInst>(Ptr);
-  if (!GEP || GEP->getNumOperands() > 2)
+  if (!GEP || !GEP->hasIndices())
     return false;
----------------
If !GEP->hasIndices() means that the GEP has only base - it is ok for the uniform base, but this GEP is not real, I think..



https://reviews.llvm.org/D39911





More information about the llvm-commits mailing list