Legalize support for MUL_LOHI and DIVREM.
authorDan Gohman <gohman@apple.com>
Fri, 5 Oct 2007 14:17:22 +0000 (14:17 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 5 Oct 2007 14:17:22 +0000 (14:17 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42636 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index 63a25796f2e2ab10f3bb5ac31d81bb7b6ef9b486..e0f2f7a94564b32cb10446826c07e024ba731e82 100644 (file)
@@ -2630,6 +2630,16 @@ SDOperand SelectionDAGLegalize::LegalizeOp(SDOperand Op) {
     }
     break;
     
+  case ISD::SMUL_LOHI:
+  case ISD::UMUL_LOHI:
+  case ISD::SDIVREM:
+  case ISD::UDIVREM:
+    // These nodes will only be produced by target-specific lowering, so
+    // they shouldn't be here if they aren't legal.
+    assert(TLI.isOperationLegal(Node->getValueType(0), Node->getValueType(0)) &&
+           "This must be legal!");
+    break;
+
   case ISD::FCOPYSIGN:  // FCOPYSIGN does not require LHS/RHS to match type!
     Tmp1 = LegalizeOp(Node->getOperand(0));   // LHS
     switch (getTypeAction(Node->getOperand(1).getValueType())) {