[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)
commit0906c8fc1c684ecbfe731c3c2f5d224dd8a6c1ce
tree931f91ca6abea0711f6cca610f330d09ca37d307
parente5b95695eaeff17e00ac84023ad743a8453f497e
[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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227308 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/imul.ll [new file with mode: 0644]
test/CodeGen/X86/imul64-lea.ll [deleted file]
test/Transforms/LoopStrengthReduce/X86/ivchain-X86.ll