[PATCH] D22295: Introduce GlobalSplit pass.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 16:09:10 PDT 2016


pcc added inline comments.

================
Comment at: lib/Transforms/IPO/GlobalSplit.cpp:52
@@ +51,3 @@
+    auto *GEP = dyn_cast<GEPOperator>(U);
+    if (!GEP || !GEP->getInRangeIndex() || *GEP->getInRangeIndex() != 1 ||
+        !isa<ConstantInt>(GEP->getOperand(1)) ||
----------------
eli.friedman wrote:
> My point was that loads and stores aren't the only way to use a pointer; what about pointer value comparisons?
Ah, yes. I think we can address that with language in the langref specifying that the result of a comparison is undefined if either operand was derived from an `inrange` GEP, with the exception of comparisons where both operands were derived from a GEP which was evaluated with identical operands up to and including the `inrange` operand. I'll update my other patch.


https://reviews.llvm.org/D22295





More information about the llvm-commits mailing list