[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 27 01:16:53 PDT 2016


nhaehnle added a comment.

Ping.



================
Comment at: lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:3331
+
+    case TargetLowering::MulExpansion::Scalarize: {
+      MVT ScalarVT = VT.getScalarType();
----------------
efriedma wrote:
> 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.
Okay, fixing this.


================
Comment at: lib/CodeGen/SelectionDAG/TargetLowering.cpp:3035
+      !OnlyLegalOrCustom || isOperationLegalOrCustom(ISD::UMUL_LOHI, HalfVT);
+  unsigned OuterBitSize = VT.getSizeInBits();
+  unsigned InnerBitSize = HalfVT.getSizeInBits();
----------------
RKSimon wrote:
> If this is going to start being used by vectors, shouldn't these getSizeInBits() calls be replaced with getScalarSizeInBits()?
Fixed, thanks.


https://reviews.llvm.org/D24956





More information about the llvm-commits mailing list