https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117068
--- Comment #3 from Cupertino Miranda <cupertino.miranda at oracle dot com> --- Indeed middle-end is already doing that conversion for BPF, in particular because of CO-RE implementation, which at gimple, turns A->B into A + __builtin_CORE_offset(<A->B>), being <A->B> internal meta information for the original access. When you have 2 consecutive conditional uses of A: OUT = COND ? A + __builtin_CORE_offset(<A->B>) : A + __builtin_CORE_offset(<A->C>); then the middle end is already doing the CSE, and converting it in: OUT = A + (COND ? __builtin_CORE_offset(<A->B>) : __builtin_CORE_offset(<A->C>)); This all to say that, we need to figure out how to limit CSE from optimizing variables that are attributed as well, through the middle-end. Is there any middle-end construct that would allow us to disable CSE for such variables/parameters? Except encapsulating it in a builtin, which I would hate to do. Regarding back-end, could we possibly at expand check for the attribute and expand to an unspec that would be classified by the target as a legitimate address. The address would be opaque through all the backend. I wonder if this would be Ok for RA or any other RTL passes?