aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/CodeGen/DAGISelHeader.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h
index 7e6728ea80..1e808ed217 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.