On 21/07/11 20:29, Joseph S. Myers wrote:
On Tue, 12 Jul 2011, Richard Guenther wrote:

(**) We really ought to forbid any arithmetic on types that have non-mode
precision and only allow conversions to/from such types.

Arithmetic on such types is a perfectly reasonable notion to have in
language-independent code and carry out language-independent optimizations
on.  There may well be a case for lowering such arithmetic earlier than
the present point at which it's lowered (expand), but it isn't obvious
that gimplification is the right point for that lowering either.

This optimization deals with real machine instructions, and so the inputs must always be in whole-mode sizes. With my patch, this pass inserts conversions to ensure this is the case.

However, the code takes into account the true precision of each input when selecting the most optimal machine instruction to use, so I think it should have satisfied both goals.

Andrew

Reply via email to