[PATCH] D75145: [PassManager] adjust VectorCombine placement

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 06:37:06 PST 2020


lebedev.ri added a comment.

In D75145#1909503 <https://reviews.llvm.org/D75145#1909503>, @dmgreen wrote:

> > just curious since we got regressions downstream after this patch... haven't looked deeper at that
>
> Same here. It looks like running cse before instcombine is altering a fair amount, at least in a way that our Low Overhead loop pass does not like. I'm not sure if there are other problems or if it's just that.
>
> Looking at it, the way the iteration count is calculated is done differently now. This code:
>  https://godbolt.org/z/2gBwF2
>  Has changed the way that the vector preheader calculated the loop iteration values. This is after (top) and before (bottom):
>  https://godbolt.org/z/tocy_x
>  Notice the differences in `%n.mod.vf = and i32 %blockSize, 7` vs `%n.vec = and i32 %blockSize, -8`. The SCEV of the BETC for the vector body is then unknown in the new case. I think that's what's causing the low overhead loop pass to go wrong, probably the unrolling too.
>
> Any thoughts?


I don't know if that helps the problem overall, but i see yet another seemingly-bogus one-use check restriction there.
https://godbolt.org/z/z8oyUC
I'll see if i can post a patch..


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75145





More information about the llvm-commits mailing list