[LegalizeDAG] Return true from ExpandNode for some nodes that don't have expand support.
authorCraig Topper <craig.topper@gmail.com>
Tue, 3 Dec 2019 07:10:57 +0000 (23:10 -0800)
committerCraig Topper <craig.topper@gmail.com>
Tue, 3 Dec 2019 07:39:20 +0000 (23:39 -0800)
These nodes have a FIXME that they only get here because a Custom
handler returned SDValue() instead of the original Op.

Even though we aren't expanding them, we should return true here to
prevent ConvertNodeToLibcall from also trying to process them until
the FIXME has been addressed.

I'm hoping to add checking to ConvertNodeToLibcall to make sure
we don't give it nodes it doesn't have support for.

llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp

index eab72a2..70cb20e 100644 (file)
@@ -3720,7 +3720,9 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) {
   case ISD::INTRINSIC_WO_CHAIN:
   case ISD::INTRINSIC_VOID:
     // FIXME: Custom lowering for these operations shouldn't return null!
-    break;
+    // Return true so that we don't call ConvertNodeToLibcall which also won't
+    // do anything.
+    return true;
   }
 
   if (!TLI.isStrictFPEnabled() && Results.empty() && Node->isStrictFPOpcode()) {