Michael S <alre…@yahoo.com> writes:
>On Mon, 30 Nov 2026 09:22:07 GMT
>ant…@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>> This does not change anything about the fact that gcc does not
>> reassociate the supposedly optimization-friendly overflow-UB integers,
>> while it does reassociate integers where overflow is defined to
>> perform modulo arithmetics.
>
>Show me.
See <2026…@mips.complang.tuwien.ac.at>, to which you
replied yourself.
>I I spent dozens of minutes looking for such cases and did not find
>them.
>In all my tests gcc either generate poorly optimized latency bound code
>both for signed and unsigned integers
In the example shown above, gcc produces reassociated code with the
same tree-height as the original code. I do not know why the authors
of the gcc reassociation transformation reassociate the computation in
this way, but I suspect that either a SPEC benchmark or a customer
application benefits from it. I would expect that, on average,
minimizing the tree height is best.
--
'Anyone trying for "industrial quality" ISA should avoid undefined behavior.'
Mitch Alsup, <c17f…@googlegroups.com>