[llvm] [SLP]Initial support for copyable elements (non-schedulable only) (PR #140279)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 10 14:29:24 PDT 2025


alexey-bataev wrote:

> Hi @alexey-bataev I have looked at the patch, but to be honest it's not easy to fully understand it specially that I'm a beginner at the SLP. Last month I was working on something similar but I didn't have the opportunity to publish it and then I saw your patch. Your patch seems much deeper :'D My patch is handling all cases where an identity operation can be created for the isomorphic instructions so it works for add/lshr and similar instructions. But I'm not pretty sure about the correctness of the idea. I have created a draft patch here: #143583 If you have time, could you please give it a look ?

Your patch solves the problem by inserting new instruction. It breaks tje design of the vectorizer - “model first, then modify”. No need to insert new instructions, it leads to issues with compile time, analysis state, etc. Instead, need to model such values as vslues, which actually represent “virtual” identity instructions without emitting such instructions.

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


More information about the llvm-commits mailing list