[PATCH] D134557: [BranchRelaxation] Fall through only if block has no unconditional branches
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 12 11:04:27 PDT 2022
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/BranchRelaxation.cpp:508-510
+ } else if (FailToAnalyze && (!PrevBB->back().isBarrier() ||
+ TII->isPredicated(PrevBB->back()))) {
+ InsertUncondBranch(PrevBB, DestBB);
----------------
gandhi21299 wrote:
> arsenm wrote:
> > Is this case covered in the test?
> I tried out various branching opcodes out there on AMDGPU, none of them satisfied the condition.
I'd prefer to just check `else if (FailToAnalyze && PrevBB->isSuccessor(DestBB))`, rather than try to figure out the specific properties of the terminator of PrevBB.
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