[Mlir-commits] [mlir] [mlir][LLVMIR] Add folder pass for `llvm.inttoptr` and `llvm.ptrtoint` (PR #143066)

Nikita Popov llvmlistbot at llvm.org
Fri Jun 6 13:26:13 PDT 2025


nikic wrote:

The canonical issue for this is https://github.com/llvm/llvm-project/issues/33896 -- though it's not particularly good reading due to its age, and is likely to leave a person more confused than before...

It's generally hard to carve out valid subsets for this transform, in part because the precise way in which inttoptr recovers provenance is not settled. I think under some models (like angelic non-determinism over all exposed pointers) the transform is essentially always invalid.

Ideally you avoid the issue in the first place by not using ptrtoint and inttoptr. Where are they coming from in your case?

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


More information about the Mlir-commits mailing list