[llvm] [InferAS] Infer the address space of inttoptr (PR #173244)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 11 01:33:03 PST 2026
nikic wrote:
Is it possible to replace the ptrtoint + arithmetic + inttoptr with ptradd(p, new_p - p)? This is the canonical way to change the value of the pointer while keeping the provenance (and in this context also address space). The pattern should get simplified to simple arithmetic in the backend.
Generally you want to avoid the emission of ptrtoint/inttoptr at all costs.
https://github.com/llvm/llvm-project/pull/173244
More information about the llvm-commits
mailing list