[PATCH] D24956: [SelectionDAG] Add expansion and promotion of [US]MUL_LOHI

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 08:20:00 PDT 2016


jyknight added a comment.

> IMHO, explicit is better than implicit. Also, how would you choose between scalarizing and half-width multiplies for vector types? You might be able to come up with a magic heuristic that works now, only to be broken when a new backend comes along.

I don't think it makes much sense to require backends to decide between Split and Half; whenever you can split into MULH and MUL, you should, and do 4 half-width multiplies otherwise.

I don't know much about the vector question -- how is that done for other operations? Surely the question about which axis to "expand" when expanding a vector operation isn't only an question for multiplication, so a MUL-specific solution to this issue feels strange -- I'd expect that either there's already a solution in use elsewhere, or a wider problem.


https://reviews.llvm.org/D24956





More information about the llvm-commits mailing list