[llvm-branch-commits] [llvm] [AMDGPU][UnifyDivergentExitNodes][StructurizeCFG] Add support for callbr instruction with inline-asm (PR #152161)
Robert Imschweiler via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 26 02:26:18 PDT 2025
================
@@ -1284,13 +1283,13 @@ bool StructurizeCFG::makeUniformRegion(Region *R, UniformityInfo &UA) {
/// Run the transformation for each region found
bool StructurizeCFG::run(Region *R, DominatorTree *DT) {
- if (R->isTopLevelRegion())
+ // CallBr and its corresponding blocks must not be modified by this pass.
----------------
ro-i wrote:
I now added some more tests and explanations to `test/Transforms/StructurizeCFG/callbr.ll`. Parent and child regions of callbr blocks are handled as usual, only callbr and its direct target blocks are currently left as they are in this pass.
I think this is best fixed as a follow-up PR, where it could potentially be merged together with the switch-handling (which could be improved as well, afaiu).
For our currently intended use cases of callbr, this works fine. Everything else would currently just be caught later in the CFG lowering.
https://github.com/llvm/llvm-project/pull/152161
More information about the llvm-branch-commits
mailing list