[SDAG] Recursively legalize both vector mulo results
authorNikita Popov <nikita.ppv@gmail.com>
Fri, 10 May 2019 20:42:48 +0000 (20:42 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Fri, 10 May 2019 20:42:48 +0000 (20:42 +0000)
commit9f7537bd4866ef38bcce5e1d2a9c903a18509c47
tree06f69eca6f0365223f4544596be845ada10e6bf0
parent962a6f35b5e05c33031c80acadb3d0ab1d00cb5a
[SDAG] Recursively legalize both vector mulo results

Split out from D61692 per RKSimon's suggestion. Vector op
legalization will automatically recursively legalize the returned
SDValue, but we need to take care of the other results ourselves.
Otherwise it will end up getting legalized only during op
legalization, by which point it might be too late (though I'm not
aware of any specific cases right now).

There are codegen differences because expansion occurs earlier now
and we don't get a DAGCombiner run in between.

Differential Revision: https://reviews.llvm.org/D61744

llvm-svn: 360470
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/test/CodeGen/AArch64/vec_umulo.ll
llvm/test/CodeGen/X86/mulo-pow2.ll
llvm/test/CodeGen/X86/vec_smulo.ll
llvm/test/CodeGen/X86/vec_umulo.ll