[llvm] [LoopVectorize] Use CodeSize as the cost kind for minsize (PR #124119)
John Brawn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 28 09:25:59 PST 2025
john-brawn-arm wrote:
> > Does the fix #118100?
>
> Isn't #118100 using -Os? If I understand correctly -Oz adds the `minsize` opt, right?
Yes, it doesn't fix #118100 due to that using -Os, which adds optsize not minsize.
> Do you have any statistics/perf number on the impact of this?
Compiling the llvm-test-suite SingleSource and MultiSource benchmarks with `--target=aarch64-none-elf -Oz -fvectorize` (we need the `-fvectorize` because clang disables vectorization by default with `-Oz`) and looking at the code size change in each object, there's only two objects where this makes a difference:
```
Object Before After
SingleSource/UnitTests/Vectorizer/recurrences.cpp.obj 3024 2940
MultiSource/Benchmarks/MallocBench/gs/gdevmem.c.obj 5492 5396
```
https://github.com/llvm/llvm-project/pull/124119
More information about the llvm-commits
mailing list