[Mlir-commits] [mlir] [MLIR][LLVM] Produce canonical const GEP in convertGEPOp (PR #226699)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Sat Sep 26 06:50:53 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-mlir-llvm

Author: Letu Ren (FantasqueX)

<details>
<summary>Changes</summary>

The DataLayout overload of ConstantExpr::getGetElementPtr is the form that replaces typed constant GEPs. Use it for inrange GEPs and fail translation when the indices cannot be reduced to a byte offset.

This resolves https://github.com/llvm/llvm-project/pull/220424#discussion_r4092337505

Assisted-by: grok-4.7

---
Full diff: https://github.com/llvm/llvm-project/pull/226699.diff


2 Files Affected:

- (modified) mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp (+6-1) 
- (modified) mlir/test/Target/LLVMIR/llvmir.mlir (+1-1) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


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


More information about the Mlir-commits mailing list