projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
acce85d
)
Return "(c1 + c2)" instead of yet another ADD node (which made this a
author
Bill Wendling
<isanbard@gmail.com>
Sun, 10 Feb 2008 08:10:24 +0000
(08:10 +0000)
committer
Bill Wendling
<isanbard@gmail.com>
Sun, 10 Feb 2008 08:10:24 +0000
(08:10 +0000)
no-op).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46922
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
patch
|
blob
|
history
diff --git
a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index be4e0102cc95403a280d745d0ad3b65ea6747bfd..3a03f2c4bfb08845e8df8864a6701ad695d1a5fb 100644
(file)
--- 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.get
Node(ISD::ADD, VT, N0, N1
);
+ return DAG.get
Constant(N0C->getValue() + N1C->getValue(), VT
);
// canonicalize constant to RHS
if (N0C && !N1C)
return DAG.getNode(ISD::ADD, VT, N1, N0);