https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121001
Bug ID: 121001 Summary: frange on float_var*0.f includes NaN even if float_var does not include NaN Product: gcc Version: 16.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: pinskia at gcc dot gnu.org Blocks: 85316 Target Milestone: --- Take: ``` float f(float a) { if (a == a) { float t = a*0.f; if (t != t) __builtin_trap (); return t; } return a; } ``` The trap should be optimized away as a can only be 0.0 or -0.0 and not a NaN. Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85316 [Bug 85316] [meta-bug] VRP range propagation missed cases