diff options
author | Justin Lebar <jlebar@google.com> | 2016-11-16 00:44:47 +0000 |
---|---|---|
committer | Justin Lebar <jlebar@google.com> | 2016-11-16 00:44:47 +0000 |
commit | 28605735298208a848b24e95aa19a7150492db85 (patch) | |
tree | 5c07d6213b6196736d6f53ab4c64bef06b45fa3c /llvm/lib/Object/SymbolSize.cpp | |
parent | 583b8687eb2b3de6f57da02e3a6a2181da1d3cc4 (diff) | |
download | bcm5719-llvm-28605735298208a848b24e95aa19a7150492db85.tar.gz bcm5719-llvm-28605735298208a848b24e95aa19a7150492db85.zip |
[BypassSlowDivision] Handle division by constant numerators better.
Summary:
We don't do BypassSlowDivision when the denominator is a constant, but
we do do it when the numerator is a constant.
This patch makes two related changes to BypassSlowDivision when the
numerator is a constant:
* If the numerator is too large to fit into the bypass width, don't
bypass slow division (because we'll never run the smaller-width
code).
* If we bypass slow division where the numerator is a constant, don't
OR together the numerator and denominator when determining whether
both operands fit within the bypass width. We need to check only the
denominator.
Reviewers: tra
Subscribers: llvm-commits, jholewinski
Differential Revision: https://reviews.llvm.org/D26699
llvm-svn: 287062
Diffstat (limited to 'llvm/lib/Object/SymbolSize.cpp')
0 files changed, 0 insertions, 0 deletions