[PATCH] D75145: [PassManager] adjust VectorCombine placement

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 6 06:05:04 PST 2020


dmgreen added a comment.

> 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?


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