[Mlir-commits] [mlir] [MLIR][LLVM] Support inrange in GEP (PR #220424)

Letu Ren llvmlistbot at llvm.org
Sat Sep 12 19:53:31 PDT 2026


================
@@ -4055,7 +4060,8 @@ OpFoldResult LLVM::GEPOp::fold(FoldAdaptor adaptor) {
                                                  adaptor.getDynamicIndices());
 
   // gep %x:T, 0 -> %x
-  if (getBase().getType() == getType() && indices.size() == 1)
+  if (!getInrangeAttr() && getBase().getType() == getType() &&
----------------
FantasqueX wrote:

Fixed.

https://github.com/llvm/llvm-project/pull/220424


More information about the Mlir-commits mailing list