[PATCH] D24557: [Loop Vectorizer] Simplified GEP cloning. NFC.

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 15 09:52:58 PDT 2016


delena added a comment.

Let's look at this GEP:

getelementptr inbounds i8, i8* %ptr, i64 %ind

May %ptr be not-loop-invariant and not-induction-variable?
It may be uniform, right?
In this case 
assert(i == getGEPInductionOperand(Gep) || Legal->isUniform(Gep->getOperand(i) || Legal->isInductionVariable(Gep->getOperand(i)))
should work, but
assert(i == getGEPInductionOperand(Gep) || PSE.getSE()->isLoopInvariant(PSE.getSCEV(Gep->getOperand(i)) || Legal->isInductionVariable(Gep->getOperand(i)))
will not.


Repository:
  rL LLVM

https://reviews.llvm.org/D24557





More information about the llvm-commits mailing list