MacDue wrote:

I'm not saying that. I'm saying that I've been told before that folding to 
`vector.reduce.*` is less canonical (as the scalar code is easier to 
understand/more things recognize it). Neither is currently transformed into the 
other. 

Also, I'm not entirely sure it's a worthwhile debate, since it's just as easy 
to match in SelectionDAG as it is in IR (the same operations exit in both 
places). Note: Whether or not this is a worthwhile thing to do also seems 
target-dependent right now, as for example x86's codegen appears much worse for 
the `vector.reduce.*` variant https://godbolt.org/z/5PedMbddr, so would need 
fixing if the canonical form changed.

https://github.com/llvm/llvm-project/pull/181162
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to