Re: [PATCH] match.pd: turn a product of two quotients into one division
Jakub Jelinek <[email protected]> Tue, 4 Aug 2026 12:24:20 +0200
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <anG91Dr6NPK5wfnY@tucnak> |
On Tue, Aug 04, 2026 at 10:21:19AM +0000, Kyrylo Tkachov wrote: > > Shouldn't this depend also on flag_unsafe_math_optimizations? > > I mean, even if infinities, NaNs and signed zeros aren't involved, > > the optimization changes the results due to different rounding, doesn't it? > > The rule is already inside a flag_reciprocal_math. I guess this > reassociates multiplication across division so maybe it should also have a > flag_associative_math. I think that would be enough without going for the > full flag_unsafe_math_optimizations? Thanks, Kyrill I'd say that flag_reciprocal_math && flag_associative_math sufficiently describe what IEEE violations it is allowed to do. Jakub