Improve overflow check
Convert x < (short) ((unsigned short)x + const) to x <= SHORT_MAX – const (and similarly for other integral types) if const is not 0. gcc/ PR tree-optimization/97223 * match.pd (overflow detection and optimization): Handle conversions. gcc/testsuite/ * gcc.dg/no-strict-overflow-4.c: Adjust expected output.
Loading
Please register or sign in to comment