[PATCH] D131181: [AMDGPU] Fix si-annotate-control-flow for visited else branch
Ruiling, Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 8 03:07:31 PDT 2022
ruiling added a comment.
> I doubt that would help.
You can have a try to remove isUniformlyReached() check for UnreachableBlock (i.e. remove the line https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/AMDGPU/AMDGPUUnifyDivergentExitNodes.cpp#L214) to see what would happen.
> In the lit test si-annotate-cf-else-visited.ll, the issue before this fix is that the if.else BB misses if intrinsic.
We also need a matching endif intrinsic in the post-dominator of if.else to make the threads diverged at if.else reconverged by kind of restoring execution mask. And the control flow edge (if.then -> if.end6.sink.split) is breaking the structure requirement for divergent control flow, which should be rewired by structurizeCFG.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D131181/new/
https://reviews.llvm.org/D131181
More information about the llvm-commits
mailing list