Commit Graph

2 Commits

Author SHA1 Message Date
Jinsong Ji 237a4493a0 [MachinePipeliner] Fix Phi refers to Phi in same stage in 1st epilogue
Summary:
This is exposed by functional testing on PowerPC.
In some pipelined loops, Phi refer to phi did not get value defined by
the Phi, hence getting wrong value later.

As the comment mentioned, we should "use the value defined by the Phi,
unless we're generating the firstepilog and the Phi refers to a Phi
 in a different stage.", so Phi refering to same stage Phi should use
the value defined by the Phi here.

Reviewers: bcahoon, hfinkel

Reviewed By: hfinkel

Subscribers: MaskRay, wuzish, nemanjai, hiraditya, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365428 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-09 02:27:35 +00:00
Jinsong Ji cc253c36a6 [PowerPC][MachinePipeliner][NFC] Add a testcase for Phi bug.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@365427 91177308-0d34-0410-b5e6-96231b3b80d8
2019-07-09 02:27:29 +00:00