case GE: if (const_val != (((HOST_WIDE_INT) 1 Wouldn't changing this "1" to "-1" also fix it and in a cleaner way? If that works, please send me the resulting patch.