Allow SMUL_LOHI and UMUL_LOHI to be narrow to MUL on targets where MUL is Custom...
authorOwen Anderson <resistor@mac.com>
Mon, 20 Jan 2014 18:41:34 +0000 (18:41 +0000)
committerOwen Anderson <resistor@mac.com>
Mon, 20 Jan 2014 18:41:34 +0000 (18:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199678 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/DAGCombiner.cpp

index 0530dbc12b244ed8e499d3e683dcaef0cbb6ee98..8205feafbdfb35e2402ca9ecf34d902f355fcf44 100644 (file)
@@ -2249,7 +2249,7 @@ SDValue DAGCombiner::SimplifyNodeWithTwoResults(SDNode *N, unsigned LoOp,
   bool HiExists = N->hasAnyUseOfValue(1);
   if (!HiExists &&
       (!LegalOperations ||
-       TLI.isOperationLegal(LoOp, N->getValueType(0)))) {
+       TLI.isOperationLegalOrCustom(LoOp, N->getValueType(0)))) {
     SDValue Res = DAG.getNode(LoOp, SDLoc(N), N->getValueType(0),
                               N->op_begin(), N->getNumOperands());
     return CombineTo(N, Res, Res);