diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index be4e0102cc..3a03f2c4bf 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -923,7 +923,7 @@ SDOperand DAGCombiner::visitADD(SDNode *N) { return N1; // fold (add c1, c2) -> c1+c2 if (N0C && N1C) - return DAG.getNode(ISD::ADD, VT, N0, N1); + return DAG.getConstant(N0C->getValue() + N1C->getValue(), VT); // canonicalize constant to RHS if (N0C && !N1C) return DAG.getNode(ISD::ADD, VT, N1, N0); |