[PATCH] D24956: [SelectionDAG] Add expansion and promotion of [US]MUL_LOHI
Nicolai Hähnle via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 01:11:56 PDT 2016
nhaehnle added a comment.
In https://reviews.llvm.org/D24956#562725, @jyknight wrote:
> I don't really understand why this needs to be a new target hook. Can't it have similar code as the MUL expansion code at LegalizeDAG.cpp:3316 (in the base version): if MULH and MUL are LegalOrCustom, then you'd split the MUL_LOHI into those two operations. Otherwise, you'd do half-width multiplies?
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.
> Also, I've fixed the sparc backend to properly implement [US]MUL_LOHI in r283381, removing the FIXME here.
Thanks!
https://reviews.llvm.org/D24956
More information about the llvm-commits
mailing list