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

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 12 10:14:34 PDT 2016


efriedma added a comment.

Legalization for certain vector operations uses "PROMOTE" to indicate that the operation should be performed in a different vector type.  That really stretches the meaning if we're using it to mean "split into multiple vector multiplies", but I guess it could work. See VectorLegalizer::Promote in LegalizeVectorOps.cpp.



================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:3331
+
+    case TargetLowering::MulExpansion::Scalarize: {
+      MVT ScalarVT = VT.getScalarType();
----------------
Sorry, I really haven't worked with this code in a while; I should have spotted the issue here earlier. :(

We can't ever scalarize an operation in LegalizeDAG: scalarizing can produce illegal types, and LegalizeDAG can't handle them.  We have to handle this a bit earlier, in LegalizeVectorOps.


https://reviews.llvm.org/D24956





More information about the llvm-commits mailing list