[PATCH] D31651: Fix in SelectionDAG::getNode() to not produce illegal BUILD_VECTOR operands

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 4 12:31:29 PDT 2017


efriedma added a comment.

> I wonder why both getTypeAction() and isTypeLegal() are called here - shouldn't they be equivalent?

See https://reviews.llvm.org/rL254653 .



================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAG.cpp:4138
       const APInt &Val = N1C->getAPIntValue();
-      return SignExtendInReg(Val);
+      return SignExtendInReg(Val, VT.getScalarType());
     }
----------------
The getScalarType() here is redundant: the type of N1C must be an integer type.


https://reviews.llvm.org/D31651





More information about the llvm-commits mailing list