https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91420
--- Comment #4 from Andrew Waterman <andrew at sifive dot com> --- In -O2, the compiler materializes ("x" + INT_MIN) by loading that symbol+offset into a register in one shot, whereas in -O0 it loads the address of "x" into a register, then adds INT_MIN to that register. The same phenomenon happens in the x86-64 -mcmodel=kernel case.