diff options
author | Sjoerd Meijer <sjoerd.meijer@arm.com> | 2019-01-31 08:38:06 +0000 |
---|---|---|
committer | Sjoerd Meijer <sjoerd.meijer@arm.com> | 2019-01-31 08:38:06 +0000 |
commit | f222259c3ce1e401008ad4f892f6849eaec96e3b (patch) | |
tree | d260d043b5c83cedf5cb8ef4b841ad150bbe8989 /llvm/lib/Passes/PassBuilder.cpp | |
parent | f7cc34cae890fdd711173fcb633cd262ee343764 (diff) | |
download | bcm5719-llvm-f222259c3ce1e401008ad4f892f6849eaec96e3b.tar.gz bcm5719-llvm-f222259c3ce1e401008ad4f892f6849eaec96e3b.zip |
[ARM] Thumb2: ConstantMaterializationCost
Constants can also be materialised using the negated value and a MVN, and this
case seem to have been missed for Thumb2. To check the constant materialisation
costs, we now call getT2SOImmVal twice, once for the original constant and then
also for its negated value, and this function checks if the constant can both
be splatted or rotated.
This was revealed by a test that optimises for minsize: instead of a LDR
literal pool load and having a literal pool entry, just a MVN with an immediate
is smaller (and also faster).
Differential Revision: https://reviews.llvm.org/D57327
llvm-svn: 352737
Diffstat (limited to 'llvm/lib/Passes/PassBuilder.cpp')
0 files changed, 0 insertions, 0 deletions