[LLVMdev] Unsigned int multiplication using UMUL_LOHI
Javier Martinez
javier at jmartinez.org
Wed Dec 9 09:43:07 PST 2009
Thanks Eli. I didn't know that the operand sign didn't affect the operation
as I've never done multiplication at the bit level.
Javier
On Tue, 8 Dec 2009 20:16:23 -0800, Eli Friedman <eli.friedman at gmail.com>
wrote:
> On Tue, Dec 8, 2009 at 7:16 PM, Javier Martinez <javier at jmartinez.org>
> wrote:
>> Eli,
>>
>> I think it is an error for LLVM to select ISD::SMUL_LOHI for UNSIGNED
>> integers; isn't it?
>
> The LLVM mul instruction isn't fundamentally signed or unsigned. For a
> 64 * 64 -> 64 multiply, it's perfectly legitimate to use 32 * 32 -> 64
> signed multiply as one of the components.
>
> -Eli
More information about the llvm-dev
mailing list