Tuning LLVM's SLP Vectorizer Cost Model for RISC-V

TL;DR. A recent LLVM patch introduced performance regressions on a RISC-V benchmark due to an inaccurate cost model for ordered vector reductions. - The regression caused profitable vectorized code to be misidentified, leading to slower scalar execution on the RISC-V target. - A fix adjusts the cost model by accounting for the initial vector build cost, restoring expected performance. - This work highlights critical compiler optimizations impacting efficiency on critical AI-related hardware.

Sources

Back to QLANKR News