[PATCH] D140790: [MachineBasicBlock] Explicit FT branching param

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 12 10:01:57 PST 2023


gandhi21299 added inline comments.


================
Comment at: llvm/test/CodeGen/AMDGPU/branch-relax-indirect-branch.mir:1
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+# RUN: llc -verify-machineinstrs -mtriple=amdgcn-amd-amdhsa --amdgpu-s-branch-bits=5 -run-pass branch-relaxation %s -o - | FileCheck %s
----------------
foad wrote:
> What is this new test testing? If it's a change in behaviour caused by your patch then please (a) precommit the test and (b) update the summary to explain what the change is.
Do you mean to commit a patch which only contains the changes in branch-relax-indirect-branch.mir? That would cause this test to fail.

Before this patch, `getFallThrough()` was essentially expanded in the branch relaxation pass which fixed a double terminator bug (D134557). As a result, an indirect branch instruction caused `SIInstrInfo::analyzeBranchImpl(..)` to return true which further reported a fatal error. This patch reverts changes made by D134557 and fixes both issues by introducing a parameter to the method `MachineBasicBlock::getFallThroughOrUnonditionalSuccessor(..)`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140790



More information about the llvm-commits mailing list