On Feb 18, 2008, at 9:55 AM, Dan Gohman wrote:
> Don't mark scalar integer multiplication as Expand on x86, since x86
> has plain one-result scalar integer multiplication instructions.
> This avoids expanding such instructions into MUL_LOHI sequences that
> must be special-cased at isel time, and avoids the problem with that
> code that provented memory operands from being folded.
>
> This fixes PR1874, addressesing the most common case. The uncommon
> cases of optimizing multiply-high operations will require work
> in DAGCombiner.

Very nice!

> +  // 8, 16, and 32-bit plain multiply are legal. And 64-bit multiply
> +  // is also legal on x86-64.
> +  if (!Subtarget->is64Bit())
> +    setOperationAction(ISD::MUL           , MVT::i64   , Expand);

Are you sure you need this?  if !is64Bit(), i64 won't be legal, so the  
multiply will be expanded unconditionally.

-Chris
_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to