[llvm] Reland "[LV]: Teach LV to recursively (de)interleave." (PR #125094)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 08:13:02 PST 2025


fhahn wrote:

> @fhahn I tried your patch, and yes it gave same costs and the patch is needed anyway for the LoopVectorize itself.
What I'm saying is that I just don't want this patch to get reverted again in the future because of different target cost for 'Add' and 'or' instructions, given that the issue is not related to the interleaving itself, so I don't want to make connection between them.

There shouldn't be a difference, as they should be interchangeable, otherwise we wouldn't have been able to generate them in the first place. I see the concern that there may be a difference between ADD and OR. I tried this on both X86 and AArch64 and at least for those it shouldn't make difference in practice.

My main concern with the early bail-out is unrelated to the underlying issue (as it could happen also without interleaving) and may hide other issues.

> Hi @fhahn Are you going to reopen your draft and make a pull request ? or I append it to my patch here #125008 ? I'm fine with the faster approach. Thank you.

I marked it as ready.

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


More information about the llvm-commits mailing list