summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2017-06-05 20:48:05 +0000
committerCraig Topper <craig.topper@gmail.com>2017-06-05 20:48:05 +0000
commitf6e138d794977f2dada8c15fed8de338d99f328d (patch)
tree6a8ae68ca766cb221e67a52fbffd02f8adbcff8f /llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp
parent7953e62f2eec40d5a6ba6be725e49eadd9c218cd (diff)
downloadbcm5719-llvm-f6e138d794977f2dada8c15fed8de338d99f328d.tar.gz
bcm5719-llvm-f6e138d794977f2dada8c15fed8de338d99f328d.zip
[ConstantRange] Remove costly udivrem from ConstantRange::truncate
Truncate currently uses a udivrem call which is going to be slow particularly for larger than 64-bit widths. As far as I can tell all we were trying to do was modulo LowerDiv by (MaxValue+1) and make sure whatever value was effectively subtracted from LowerDiv was also subtracted from UpperDiv. This patch recognizes that MaxValue+1 is a power of 2 so we can just use a bitwise AND to accomplish a modulo operation or isolate the upper bits. Differential Revision: https://reviews.llvm.org/D32672 llvm-svn: 304733
Diffstat (limited to 'llvm/lib/ObjectYAML/CodeViewYAMLDebugSections.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud