[llvm] AMDGPU: fix isSafeToSink expecting exactly one predecessor (PR #89224)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 19 09:21:04 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
----------------
petar-avramovic wrote:
Your proposal without asserts would return something even if input was not "structurized-cfg". Do we want to return something even when CFG is something we don't handle?
https://github.com/llvm/llvm-project/pull/89224
More information about the llvm-commits
mailing list