The pass AMDGPUUnifyDivergentExitNodes does not update the phi nodes in the successors of blocks that is splits. This is fixed by calling BasicBlock::splitBasicBlock to split the block instead of doing it manually. This does extra work because a new conditional branch is created in BB which is immediately replaced, but I think the simplicity is worth it. It also helps make the code more future proof in case other things need to be updated.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
LGTM with nit
test/CodeGen/AMDGPU/update-phi.ll | ||
---|---|---|
2 | Can you replace the checks with update_test_checks? |
test/CodeGen/AMDGPU/update-phi.ll | ||
---|---|---|
2 | Done. |
Comment Actions
I cannot commit this change. Hopefully somebody can take care of that for me. Thanks.
Can you replace the checks with update_test_checks?