summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/help/TestHelp.py
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2017-07-25 10:48:32 +0000
committerChandler Carruth <chandlerc@gmail.com>2017-07-25 10:48:32 +0000
commit1dc34c6d80e8bc5ac834716126facf57eee58315 (patch)
tree9e018b09c5970ebe217e7d203dec1819e8ec2a93 /lldb/packages/Python/lldbsuite/test/help/TestHelp.py
parent9fdd5fa5e0c32e5bf4c3d3c9406778302a7ae4c5 (diff)
downloadbcm5719-llvm-1dc34c6d80e8bc5ac834716126facf57eee58315.tar.gz
bcm5719-llvm-1dc34c6d80e8bc5ac834716126facf57eee58315.zip
[LIR] Teach LIR to avoid extending the BE count prior to adding one to
it when safe. Very often the BE count is the trip count minus one, and the plus one here should fold with that minus one. But because the BE count might in theory be UINT_MAX or some such, adding one before we extend could in some cases wrap to zero and break when we scale things. This patch checks to see if it would be safe to add one because the specific case that would cause this is guarded for prior to entering the preheader. This should handle essentially all of the common loop idioms coming out of C/C++ code once canonicalized by LLVM. Before this patch, both forms of loop in the added test cases ended up subtracting one from the size, extending it, scaling it up by 8 and then adding 8 back onto it. This is really silly, and it turns out made it all the way into generated code very often, so this is a surprisingly important cleanup to do. Many thanks to Sanjoy for showing me how to do this with SCEV. Differential Revision: https://reviews.llvm.org/D35758 llvm-svn: 308968
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/help/TestHelp.py')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud