diff options
author | Chen Li <meloli87@gmail.com> | 2015-12-11 23:39:32 +0000 |
---|---|---|
committer | Chen Li <meloli87@gmail.com> | 2015-12-11 23:39:32 +0000 |
commit | e8f9387e0cae74b54a8e77310477626a59a91aed (patch) | |
tree | e5f75a53967d9a5f6205fee45900ea6c151594e2 /lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py | |
parent | ac2adce66bf223efd01e19cda94813ef93cdaddb (diff) | |
download | bcm5719-llvm-e8f9387e0cae74b54a8e77310477626a59a91aed.tar.gz bcm5719-llvm-e8f9387e0cae74b54a8e77310477626a59a91aed.zip |
[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
llvm-svn: 255391
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/example/TestSequenceFunctions.py')
0 files changed, 0 insertions, 0 deletions