[PATCH] D134557: [BranchRelaxation] Fall through only if block has no unconditional branches

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 19:27:00 PDT 2022


gandhi21299 added inline comments.


================
Comment at: llvm/lib/CodeGen/BranchRelaxation.cpp:487
+      if (auto *FT = PrevBB->getFallThrough()) {
+        assert(FT == DestBB);
+        TII->insertUnconditionalBranch(*PrevBB, FT, DebugLoc());
----------------
bcahoon wrote:
> Is it possible to add the assert to your change? Unless it's not needed anymore.
I made EnforceFallthrough usable more generally so it would be inconsistent to insert the assertion in the lambda.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134557



More information about the llvm-commits mailing list