aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-28 21:56:16 +0000
committerChris Lattner <sabre@nondot.org>2010-02-28 21:56:16 +0000
commit29534c25ac9c2243a53c29c2aa88f8ce7cd0ceaf (patch)
tree8abf9732c6ef2a04fc6474073e6c54fd7fff865b /include
parent414bac863c802c6e9ee2209acc0926393b89baf8 (diff)
downloadexternal_llvm-29534c25ac9c2243a53c29c2aa88f8ce7cd0ceaf.zip
external_llvm-29534c25ac9c2243a53c29c2aa88f8ce7cd0ceaf.tar.gz
external_llvm-29534c25ac9c2243a53c29c2aa88f8ce7cd0ceaf.tar.bz2
resolve a fixme by using hte new flag.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97420 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/CodeGen/DAGISelHeader.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/include/llvm/CodeGen/DAGISelHeader.h b/include/llvm/CodeGen/DAGISelHeader.h
index 9aec982..51bb2f4 100644
--- a/include/llvm/CodeGen/DAGISelHeader.h
+++ b/include/llvm/CodeGen/DAGISelHeader.h
@@ -889,17 +889,15 @@ SDNode *SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable,
Res->setNodeId(-1);
}
- // FIXME: Whether the selected node has a flag result should come from
- // flags on the node.
unsigned ResNumResults = Res->getNumValues();
- if (Res->getValueType(ResNumResults-1) == MVT::Flag) {
- // Move the flag if needed.
- if (OldFlagResultNo != -1 &&
- (unsigned)OldFlagResultNo != ResNumResults-1)
- ReplaceUses(SDValue(NodeToMatch, OldFlagResultNo),
- SDValue(Res, ResNumResults-1));
+ // Move the flag if needed.
+ if ((EmitNodeInfo & OPFL_FlagOutput) && OldFlagResultNo != -1 &&
+ (unsigned)OldFlagResultNo != ResNumResults-1)
+ ReplaceUses(SDValue(NodeToMatch, OldFlagResultNo),
+ SDValue(Res, ResNumResults-1));
+
+ if ((EmitNodeInfo & OPFL_FlagOutput) != 0)
--ResNumResults;
- }
// Move the chain reference if needed.
if ((EmitNodeInfo & OPFL_Chain) && OldChainResultNo != -1 &&