On 17/08/12 18:05, Richard Earnshaw wrote:
Take two.
This version should address your concerns about handling
(u32)u16 * (u32)u16 -> u64
We now look at each operand directly, but when doing so we check whether
the operand is the same size as the result or not. When it is, we can
strip any conversion; when it isn't the conversion must preserve
signedness of the inner operand and mustn't be a narrowing conversion.
So, if I understand correctly, this simply prevents it from stripping
any conversions from the multiply's right-hand-side if they are not
widening conversions?
That seems fine to me. Not that I have authority to approve it, of course.
Andrew