[llvm] AMDGPU: fix isSafeToSink expecting exactly one predecessor (PR #89224)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 19 10:48:33 PDT 2024
================
@@ -217,10 +217,20 @@ bool SIInstrInfo::isSafeToSink(MachineInstr &MI,
SmallVector<MachineBasicBlock *, 1> ExitBlocks;
FromCycle->getExitBlocks(ExitBlocks);
assert(ExitBlocks.size() == 1);
- assert(ExitBlocks[0]->getSinglePredecessor());
-
+ // After structurize-cfg, cycle exit block should have exactly one
----------------
jayfoad wrote:
Yes, if *this* code can easily handle arbitrary CFGs then it should do so.
If other parts of the code cannot handle arbitrary CFGs, then they should detect the problems.
https://github.com/llvm/llvm-project/pull/89224
More information about the llvm-commits
mailing list