summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/ctrloop-shortLoops.ll
Commit message (Collapse)AuthorAgeFilesLines
* [PowerPC] Add profitablilty check for conversion to mtctr loopsLei Huang2017-10-121-0/+116
Add profitability checks for modifying counted loops to use the mtctr instruction. The latency of mtctr is only justified if there are more than 4 comparisons that will be removed as a result. Usually counted loops are formed relatively early and before unrolling, so most low trip count loops often don't survive. However we want to ensure that if they do, we do not mistakenly update them to mtctr loops. Use CodeMetrics to ensure we are only doing this for small loops with small trip counts. Differential Revision: https://reviews.llvm.org/D38212 llvm-svn: 315592
OpenPOWER on IntegriCloud