[llvm-branch-commits] [llvm] [LV] Bundle (partial) reductions with a mul of a constant (PR #162503)

Sam Tebbs via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Oct 20 02:02:23 PDT 2025


SamTebbs33 wrote:

> I may have missed it, but I don't see anything in the cost model work related to the trunc/extend feature, just the addition of asserts.
> 
> Could you please make that an independent PR?

In #147302 I was asked to make `IsMulAccValidAndClampRange` assert that the partial reduction cost is <= the base cost of the add + mul + extends, but had to change that to a return since the `add(mul(ext, const))` case was failing the assertion since it follows the same code path. This PR adds support for that `add(mul(ext, const))` case so it makes sense to return to the assertion in this PR. The PR is still small as it is anyway, and I was asked to re-add the assertion in this PR (https://github.com/llvm/llvm-project/pull/147302#discussion_r2426683086).

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


More information about the llvm-branch-commits mailing list