[LLVMdev] arithmetical operands signedness (original) (raw)

Christophe de Dinechin christophe at taodyne.com
Mon Sep 5 09:35:03 PDT 2011


On 5 sept. 2011, at 17:48, Duncan Sands wrote:

since the result of a multiply doesn't depend on the signedness, I find it strange that your target differentiates between them. What I'm saying is that if you have (say) two i32 numbers a and b and you do a signed multiply: c = a *s b and an unsigned multiply d = a *u b then c and d are the same number (exactly the same bits set).

At least two architectures I know about have size-extending multiplication, for which your statement is not true:

I'm pretty sure there are other similar architectures.

Regards Christophe



More information about the llvm-dev mailing list