[PATCH] D64946: [AMDGPU] Fix trivial PHI into SI_END_CF.

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 01:57:46 PDT 2019


rampitec added a comment.

In D64946#1595185 <https://reviews.llvm.org/D64946#1595185>, @nhaehnle wrote:

> In D64946#1593675 <https://reviews.llvm.org/D64946#1593675>, @rampitec wrote:
>
> > In D64946#1593334 <https://reviews.llvm.org/D64946#1593334>, @nhaehnle wrote:
> >
> > > How about the following simpler logic:
> > >
> > > - if the PHI is used by any basic-block prologue instruction (except other PHIs), then insert the COPY at the top of the basic block
> > > - otherwise, insert the COPY after the basic-block prologue
> >
> >
> > In this case COPY in the prologue also shall be marked as prologue instruction somehow.
>
>
> You're right, my idea doesn't work.


Unless we find a way to mark it as a prologue. An easiest (but not clean) way is to mark copy as impdef exec.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64946/new/

https://reviews.llvm.org/D64946





More information about the llvm-commits mailing list