[PATCH] D12196: [ARM] Extract shifts out of multiply-by-constant
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 08:39:20 PDT 2015
john.brawn created this revision.
john.brawn added reviewers: t.p.northover, rengolin.
john.brawn added a subscriber: llvm-commits.
john.brawn set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.
Turning (op x (mul y k)) into (op x (lsl (mul y k>>n) n)) is beneficial when we can do the lsl as a shifted operand and the resulting multiply constant is simpler to generate.
Do this by doing the transformation when trying to select a shifted operand, as that ensures that it actually turns out better (the alternative would be to do it in PreprocessISelDAG, but we don't know for sure there if extracting the shift would allow a shifted operand to be used).
Repository:
rL LLVM
http://reviews.llvm.org/D12196
Files:
lib/Target/ARM/ARMISelDAGToDAG.cpp
test/CodeGen/ARM/shifter_operand.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12196.32699.patch
Type: text/x-patch
Size: 14191 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150820/a5a1f35e/attachment.bin>
More information about the llvm-commits
mailing list