[X86] Reduce some 32-bit imuls into lea + shl
authorMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 28 Jan 2015 14:08:22 +0000 (14:08 +0000)
committerMichael Kuperstein <michael.m.kuperstein@intel.com>
Wed, 28 Jan 2015 14:08:22 +0000 (14:08 +0000)
commit951995821a97969f662ac737e5a54689680b075f
tree0fd2bbbacf749ec435ed7422a1667e80df093408
parentf387611ac2d6f40d9070aa434fc5aa4131e238c3
[X86] Reduce some 32-bit imuls into lea + shl

Reduce integer multiplication by a constant of the form k*2^c, where k is in {3,5,9} into a lea + shl. Previously it was only done for imulq on 64-bit platforms, but it makes sense for imull and 32-bit as well.

Differential Revision: http://reviews.llvm.org/D7196

llvm-svn: 227308
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/imul.ll [new file with mode: 0644]
llvm/test/CodeGen/X86/imul64-lea.ll [deleted file]
llvm/test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll