OSDN Git Service

Add an assert to verify that we don't see an
authorDan Gohman <gohman@apple.com>
Mon, 25 Feb 2008 22:15:55 +0000 (22:15 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 25 Feb 2008 22:15:55 +0000 (22:15 +0000)
{S,U}MUL_LOHI with an unused high value.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47569 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/X86/X86ISelDAGToDAG.cpp

index 75e9fae..af6576b 100644 (file)
@@ -1221,6 +1221,9 @@ SDNode *X86DAGToDAGISel::Select(SDOperand N) {
 
     case ISD::SMUL_LOHI:
     case ISD::UMUL_LOHI: {
+      assert(!N.getValue(1).use_empty() &&
+             "A MUL_LOHI with an unused high result should fold to a MUL!");
+
       SDOperand N0 = Node->getOperand(0);
       SDOperand N1 = Node->getOperand(1);