7 Commits

Author SHA1 Message Date
Jinsong Ji
7b45a0f19b [NFC][PowerPC] Consolidate testing of common linkage symbols
Add a new file to test the code gen for common linkage symbol.
Remove common linkage in some other testcases to avoid distraction.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372426 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-20 20:31:37 +00:00
Chen Zheng
adf8ddb23a [PowerPC] exclude ICmpZero in LSR if icmp can be replaced in later hardware loop.
Differential Revision: https://reviews.llvm.org/D63477


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364993 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-03 01:49:03 +00:00
Guozhi Wei
7eae8125c6 [MBP] Move a latch block with conditional exit and multi predecessors to top of loop
Current findBestLoopTop can find and move one kind of block to top, a latch block has one successor. Another common case is:

    * a latch block
    * it has two successors, one is loop header, another is exit
    * it has more than one predecessors

If it is below one of its predecessors P, only P can fall through to it, all other predecessors need a jump to it, and another conditional jump to loop header. If it is moved before loop header, all its predecessors jump to it, then fall through to loop header. So all its predecessors except P can reduce one taken branch.

Differential Revision: https://reviews.llvm.org/D43256




git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@363471 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-14 23:08:59 +00:00
Chen Zheng
ed46a5f15d [PowerPC] initialize SchedModel according to platform.
Differential Revision: https://reviews.llvm.org/D60177


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357962 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-09 01:25:25 +00:00
Chen Zheng
68e1cfff74 [PowerPC]add testcase for ppcctrloops pass shortloop check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357560 91177308-0d34-0410-b5e6-96231b3b80d8
2019-04-03 03:11:34 +00:00
Sanjay Patel
39da3a3c7c [PowerPC] adjust test for uaddo change in rL353001
We don't need a mtctr/bctr for this test now; a regular
conditional branch is fine.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353002 91177308-0d34-0410-b5e6-96231b3b80d8
2019-02-03 18:10:16 +00:00
Lei Huang
818cdb5df7 [PowerPC] Add profitablilty check for conversion to mtctr loops
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315592 91177308-0d34-0410-b5e6-96231b3b80d8
2017-10-12 16:43:33 +00:00