[llvm] [AMDGPU] Check for a live interval before querying register kind in getLiveRegs (PR #209328)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 13 15:46:09 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp -- llvm/lib/Target/AMDGPU/GCNRegPressure.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
index 4680314ca..dcc61eee2 100644
--- a/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNRegPressure.cpp
@@ -512,7 +512,8 @@ GCNRPTracker::LiveRegSet llvm::getLiveRegs(SlotIndex SI,
// Check for a live interval before querying the register kind: getRegKind
// reads the register class, which is unset for classless vregs (e.g. unused
// GlobalISel InstructionSelect leftovers). Such vregs have no interval, so
- // testing hasInterval first skips them without touching their (absent) class.
+ // testing hasInterval first skips them without touching their (absent)
+ // class.
if (!LIS.hasInterval(Reg))
continue;
if (RegKind != GCNRegPressure::TOTAL_KINDS &&
``````````
</details>
https://github.com/llvm/llvm-project/pull/209328
More information about the llvm-commits
mailing list