[PATCH] D133840: AMDGPU: Add a pass to rewrite certain undef in PHI
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 06:07:16 PDT 2022
ruiling added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp:116
+ HasBackedgeUndef = true;
+ } else if (Incoming != &PHI) {
+ if (!UniqueDefinedIncoming) {
----------------
sameerds wrote:
>
sounds good.
================
Comment at: llvm/lib/Target/AMDGPU/AMDGPURewriteUndefForPHI.cpp:122
+ // Update DominateBB if necessary.
+ if (DT->dominates(IncomingBB, DominateBB))
+ DominateBB = IncomingBB;
----------------
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.
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