[llvm] [LoopVectorize] Make needsExtract notice scalarized instructions (PR #119720)

John Brawn via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 13 04:14:17 PST 2024


john-brawn-arm wrote:

> Perhaps I'm wrong, but I thought only -Oz really optimises the binary to get the lowest code size possible at all costs. That's the sort of scenario I'd imagine you'd use TCK_CodeSize for. But in that case does the pass manager even run the vectoriser? Whereas I thought -Os was different, where we're making a trade-off between performance and trying not to make the binary too big? Some increase in binary size is acceptable if the performance gains are justified. So, for example, with -Os we probably don't want to do loop versioning, have runtime memory or SCEV checks, etc, but still want to choose a best vectorisation factor based on a reciprocal throughput model.

This is a discussion to have when I finish https://github.com/llvm/llvm-project/commit/38cadabf6eccbfe9f4c32d323a777886528fa2f8 and create a pull request for it.

https://github.com/llvm/llvm-project/pull/119720


More information about the llvm-commits mailing list