This reminds me of a bug in the msp430 variant of gcc. The compiler would replace "x <= literal" with "x < literal + 1" because it generated more efficient code. If the literal was UINT_MAX, though, the compiler would trudge ahead and roll over the literal to 0. It would then subsequently reason that the comparison was unconditionally false, and then completely optimize away the nominal path of my code. That was a frustrating day of debugging!
The only solution is to throw them away, e.g. Android style.
The Linux kernel is an implementation detail.
There is nothing UNIX related exposed to userspace.
Java and Kotlin applications, while NDK APIs are clearly defined,
https://developer.android.com/ndk/guides/stable_apis
Or Treble Project for that matter,
https://source.android.com/devices/architecture/hidl
Try to use private APIs (which is what the Linux underpinnings are) and the application might be blessed with being killed by the OS.
In my opinion hinting won't help. Everyone who cares about the performance gain will enable the hint (which I expect will be almost everyone) so you have won nothing but added noise with the hint.