https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65694
--- Comment #6 from ktkachov at gcc dot gnu.org --- (In reply to ktkachov from comment #5) > (In reply to ktkachov from comment #4) > > This looks similar to PR 64600. > > The problem seems to be arm_canonicalize_comparison that > > canonicalizes a comparison with 2147483647 (0x7fffffff) > > into a comparison with that +1, that is 0x80000000 without properly > > sign-extending it into 0xffffffff80000000 (which would make it -2147483648). > > That's not right logic, need to think a bit harder on what to do here... err... Ignore this. I think doing the sign-extend here is the right thing to do. All these numbers close to INT_MIN/MAX are very fiddly :(