On 07/01/2011 03:30 PM, Stubbs, Andrew wrote:
>  However, perhaps there is a catch. We can do the following thought
>  experiment. What would happen if you had multiple widening multiplies?
>  Like 8-bit signed to 64-bit unsigned and then 64-bit unsigned to 128-bit
>  unsigned? I believe in this case you couldn't optimize 8-bit signed to
>  128-bit unsigned. Would your code do it?
My code does not attempt to combine multiple multiplies. In any case, if
you have two multiplications, surely you have at least three input
values, so they can't be combined?

What about (u128)c + (u64)((s8)a * (s8)b)? You cannot convert this to (u128)c + (u128)((s8)a * (s8)b).

Paolo

Reply via email to