[PATCH] D117502: [LV] Combine vector reductions parts in tree instead of serially.

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 19 02:37:06 PST 2022


dmgreen added a comment.

> It won't have a massive impact in general, but it shaves off a few cycles, depending on the interleave count.
>
> AFAICT the redistributions done in the https://godbolt.org/z/z4nf5hPna are done by `ReassoicatePass`, which likes to turn parallel reduction trees into serial ones (? but that's a separate issue I think), like for `@float2`, which looks like it got serialized. I don't think any passes that run after the vectorizer try to improve the length of reduction chains: https://godbolt.org/z/v4K4aK3a1

Do we think this is something that should be done in general? This looks like it will allow the reordering of fp instructions under `-hints-allow-reordering=true` without fast flags, which would not otherwise be reassociatable. But the other cases could always be done by the backend if it considered it profitable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D117502



More information about the llvm-commits mailing list