[llvm] [GlobalOpt] Check if global gets compared to pointer of different obj. (PR #153789)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 15 09:59:49 PDT 2025


https://github.com/efriedma-quic commented:

This logic seems like it's working the wrong way: in general, you have to assume the pointer points to a different object unless you can prove it points to the same object.

If you want to check if a pointer points to a certain object, you can just use getUnderlyingObject().

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


More information about the llvm-commits mailing list