[PATCH] D86634: [AMDGPU] SILowerControlFlow::optimizeEndCF should remove empty basic block

Alexander via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 15:02:15 PDT 2020


alex-t added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/collapse-endcf.mir:26
   ; GCN:   successors: %bb.4(0x80000000)
-  ; GCN:   DBG_VALUE
+  ; GCN:   S_BRANCH %bb.4
   ; GCN: bb.4:
----------------
rampitec wrote:
> I still see redundant branches.
It is impossible to remove block without inserting branch. Otherwise I have to rebuild MBBs layout.
Machine Verifier explicitly requires fallthru to be the next item in MBBs list.

```
      if (Fallthrough && SuccMBB == MBB->getNextNode())
        continue;
     report("MBB has unexpected successors which are not branch targets, "
             "fallthrough, EHPads, or inlineasm_br targets.",
             MBB);
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86634/new/

https://reviews.llvm.org/D86634



More information about the llvm-commits mailing list