https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107591
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> --- (In reply to Aldy Hernandez from comment #6) > FYI, the range operators have a relation field, so it should be able to tell > you that both operands are equal with VREL_EQ (?). You could use that to > optimize things. You're right, at least for irange trio.op1_op2 () in the mult fold_range is VREL_EQ and we could just go from that. For frange perhaps it isn't as perfect because of signed zeros, so in float foo (float x, float y) { if (x == y) return x * y; return 42.0f; } trio.op1_op2 () could be VREL_EQ even if one is signed and the other unsigned zero, and in that case -0.0 would need to be in the range too. But maybe that is good enough for now.