summaryrefslogtreecommitdiff
path: root/lib/LTO
diff options
context:
space:
mode:
authorChen Li <meloli87@gmail.com>2015-12-12 01:04:15 +0000
committerChen Li <meloli87@gmail.com>2015-12-12 01:04:15 +0000
commitf99bcae76f160415bfae61e9b20ffde66d045b4a (patch)
treea39483d7dc19618f33d74e425a7bd56deb9105c9 /lib/LTO
parent9bc6874751243505aa43af6cf6d66d86eb9f7bdc (diff)
[X86ISelLowering] Add additional support for multiplication-to-shift conversion.
Summary: This patch adds support of conversion (mul x, 2^N + 1) => (add (shl x, N), x) and (mul x, 2^N - 1) => (sub (shl x, N), x) if the multiplication can not be converted to LEA + SHL or LEA + LEA. LLVM has already supported this on ARM, and it should also be useful on X86. Note the patch currently only applies to cases where the constant operand is positive, and I am planing to add another patch to support negative cases after this. Reviewers: craig.topper, RKSimon Subscribers: aemerson, llvm-commits Differential Revision: http://reviews.llvm.org/D14603 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@255415 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO')
0 files changed, 0 insertions, 0 deletions