chenmindong via llvm-dev
2020-Aug-05 09:33 UTC
[llvm-dev] Why is LSR positioned after LV in the pass pipeline?
Hi, We know LoopVectorize is a target-independent optimization and is run in quite early stage, while LSR is a target-specific one and is apparently later than LV. The problem here is in some cases I’ve seen, if some expansive computations in a loop are users of vectorized induction variables, they cannot be reduced because vector type is not scevable and those chains wont’ be collected in LSR. Even for scalar induction variables, put LSR behind LV affects LV’s cost computation and possibly makes llvm wrongly assume some loops are not beneficial to vectorize. I’d really appreciate it if someone could explain the rationale here. Regards, Mindong -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20200805/88a3e3e8/attachment.html>