3 Commits

Author SHA1 Message Date
Jinsong Ji 92986a84f2 [PowerPC][NFC] Update testcase to avoid dead code
The original testcase might be optimized out due to dead code,
update the testcase to avoid it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365810 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-11 19:16:33 +00:00
Jinsong Ji 4d1e6104e6 [MachinePipeliner] Fix risky iterator usage R++, --R
When we calculate MII, we use two loops, one with iterator R++ to
check whether we can reserve the resource, then --R to move back
the iterator to do reservation.

This is risky, as R++, --R may not point to the same element at all.
The can cause wrong MII.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364353 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 21:50:56 +00:00
Jinsong Ji fdb08e373c [PowerPC][NFC]Add a test for MachinePipeliner bug
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@364350 91177308-0d34-0410-b5e6-96231b3b80d8
2019-06-25 20:56:17 +00:00