[Mlir-commits] [mlir] [MLIR][LLVM] Support inrange in GEP (PR #220424)
Tobias Gysi
llvmlistbot at llvm.org
Mon Sep 14 12:02:52 PDT 2026
================
@@ -695,7 +695,9 @@ bool LLVM::GEPOp::canUsesBeRemoved(
SmallVectorImpl<OpOperand *> &newBlockingUses,
const DataLayout &dataLayout) {
// GEP can be removed as long as it is a no-op and its users can be removed.
- if (!hasAllZeroIndices(*this))
+ // `inrange` is defined relative to the GEP result, so a zero-index GEP is
+ // not a no-op when that would drop the qualifier.
----------------
gysit wrote:
nit: the comment should focus on saying an inrange gep on an alloca is illegal which is why we bail out here.
https://github.com/llvm/llvm-project/pull/220424
More information about the Mlir-commits
mailing list