[llvm] [SLP]Analyze widened reduction leaves in the narrow type (PR #216062)

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 04:22:50 PDT 2026


alexey-bataev wrote:

> My main concern with this current approach is that the end codegen isn't great.
> 
> Would it make more sense to treat `zext` as a copyable? We'd have to keep track of which lanes were already extended and support different typed lanes (simple case would be to support only bitmanip instructions with different widths) which could be problematic.

I tried to apply logic of copyables here, but the problem is that copyables do not work here. They do not support type change (that comes from cast expression) and semantics of the transformation is a reassociation across the casts, while copyables model opcode indentity and cannot reassociate across casts

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


More information about the llvm-commits mailing list