]> granicus.if.org Git - llvm/commit
[MachinePipeliner] Fix Phi refers to Phi in same stage in 1st epilogue
authorJinsong Ji <jji@us.ibm.com>
Tue, 9 Jul 2019 02:27:35 +0000 (02:27 +0000)
committerJinsong Ji <jji@us.ibm.com>
Tue, 9 Jul 2019 02:27:35 +0000 (02:27 +0000)
commit237a4493a0fce1a5848283bdf393cd80107b5632
tree2b189a5fd761245e6ba2af8a293bae58e24a3848
parentcc253c36a676d436b73d3c6c5a72d468695ed209
[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
lib/CodeGen/MachinePipeliner.cpp
test/CodeGen/PowerPC/sms-phi.ll