https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110982
Bug ID: 110982 Summary: (unsigned)(signed_char) != (unsigned)-1 is never changed back into signed_char != -1 Product: gcc Version: 14.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: enhancement Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Target Milestone: --- While looking into a failure after improving VRP, I see we never translate this: ``` bool f(signed char t) { unsigned int t1 = t; return t1 != (unsigned int)-1; } ``` into: ``` bool f0(signed char t) { return t != -1; } ```