From 0fb65cffa6d759f9b18177286edc29688a0a88b3 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 21 Feb 2010 07:19:06 +0000 Subject: [PATCH] handle optional in flags that aren't present. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96731 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/CodeGen/DAGISelHeader.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h index 7e6728ea807..1e808ed217d 100644 --- a/include/llvm/CodeGen/DAGISelHeader.h +++ b/include/llvm/CodeGen/DAGISelHeader.h @@ -672,7 +672,7 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, // If this has chain/flag inputs, add them. if (EmitNodeInfo & OPFL_Chain) Ops.push_back(InputChain); - if (EmitNodeInfo & OPFL_Flag) + if ((EmitNodeInfo & OPFL_Flag) && InputFlag.getNode() != 0) Ops.push_back(InputFlag); // Create the node. -- 2.34.1