[llvm] AMDGPU: fix isSafeToSink expecting exactly one predecessor (PR #89224)
Petar Avramovic via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 18 06:51:03 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:
OK, write it like that for simplicity and delete asserts. Can we leave some of the comments? I don't like fully hiding expected CFG as it could give wrong impression that we can deal with cycle with two divergent exits or similar
https://github.com/llvm/llvm-project/pull/89224
More information about the llvm-commits
mailing list