http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51783
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-07 18:57:52 UTC --- (In reply to comment #2) > Well, IMHO it is still valid in the case of argument of ne/eq comparison, as > indeed here sign and wrap-around doesn't matter. Maybe for this exact IR but what happens if someone later on used c somewhere else? Anyways I don't think this is a missed optimization at all because the code produced will be the same as PLUS_EXPR for both unsigned and signed int types will be expanded the same. The only thing that is removed is the cast which is a nop here.