[llvm-branch-commits] [llvm] [AMDGPU] Fold a constant add/sub into the sudot4/sudot8 accumulator (PR #225322)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Sep 22 01:11:51 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Harrison Hao (harrisonGPU)

<details>
<summary>Changes</summary>

Fold a constant add into the accumulator operand of sudot4 and sudot8 when
clamping is disabled:
```
  sudot(a, b, C1, false) + C2 -> sudot(a, b, C1 + C2, false)
```
Subtraction by a constant is canonicalized to addition of its negation.

---

<sub>Stack created with <a href="https://github.com/github/gh-stack">GitHub Stacks CLI</a> • <a href="https://gh.io/stacks-feedback">Give Feedback 💬</a></sub>

---
Full diff: https://github.com/llvm/llvm-project/pull/225322.diff


2 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/AMDGPUInstCombineIntrinsic.cpp (+26) 
- (modified) llvm/test/Transforms/InstCombine/AMDGPU/llvm.amdgcn.sudot.ll (+4-8) 


``````````diff
The server is unavailable at this time. Please wait a few minutes before you try again.
``````````

</details>


https://github.com/llvm/llvm-project/pull/225322


More information about the llvm-branch-commits mailing list