[llvm] [VPlan] Impl VPlan-based pattern match for ExtendedRed and MulAccRed (NFCI) (PR #113903)
Elvis Wang via llvm-commits
llvm-commits at lists.llvm.org
Sun Nov 10 18:09:56 PST 2024
ElvisWang123 wrote:
> Some tests in [ab9178e](https://github.com/llvm/llvm-project/commit/ab9178e3e73dc715463e1019ed2cd449dc18bb18).
Thanks for adding new tests.
Update the condition of creating MulAccRecipe for `reduce.add(zext(mul(sext(A), sext(B))))` when `A == B`. The new patch can pass all assertion checks.
To support `mla_and_add_together_16_64` which contains two reduction patterns in same loop, `reduce.add(zext(mul(sext(A), sext(A))))` and `reduce(sext(A))`. I removed the checks of if the extend recipes has only one user to align the behavior of the legacy model. This change might lead to miscalculating cost if the extend recipes will be used by other recipes not in the reduction pattern, which we still need to calculate the costs of extend recipes. But I think we would have same issue in the legacy cost model that we can fix it in future.
https://github.com/llvm/llvm-project/pull/113903
More information about the llvm-commits
mailing list