ritter-x2a wrote: > Actually, thinking about it a bit more, the "allocated object" referenced in > the LangRef spec doesn't actually have to be live. So you also have to worry > about objects which were previously allocated at the same address... which > means inbounds is basically meaningless for a pointer created using inttoptr.
Is your point here that we cannot justify any transformation based on `inbounds` unless we prove that the base pointer is not the (direct or indirect) result of inttoptr? I don't agree with that. An inbounds gep tells us that there is (or was) some object that the base pointer points into (or just after) and the result still points into (or just after) that object; otherwise the result is poison. That's for instance useful if your architecture has memory segments whose borders allocated objects cannot cross and where you can only fold offsets into memory access instructions if they don't leave the memory segment of the base address. https://github.com/llvm/llvm-project/pull/131862 _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits