[PATCH] D133840: AMDGPU: Add a pass to rewrite certain undef in PHI
Sameer Sahasrabuddhe via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 22:01:02 PDT 2022
sameerds added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp:122
+ // Update DominateBB if necessary.
+ if (DT->dominates(IncomingBB, DominateBB))
+ DominateBB = IncomingBB;
----------------
ruiling wrote:
> sameerds wrote:
> > If this is not true, then does DominateBB dominate IncomingBB?
> No, this is used to handle case like with_uniform_region_inside added in this change. If IncomingBB does not dominate DominateBB, they may be successors of the same block in case their common predecessor has uniform branch.
My confusion is that the "all_of" check later in the code only ensures that DominateBB dominates all the undefined values. But how does one prove that UniqueDefinedIncoming dominates all the uses of the PHI?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133840/new/
https://reviews.llvm.org/D133840
More information about the llvm-commits
mailing list