projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c7e4c4d
)
Convert
author
Bill Wendling
<isanbard@gmail.com>
Sun, 7 Sep 2008 11:34:47 +0000
(11:34 +0000)
committer
Bill Wendling
<isanbard@gmail.com>
Sun, 7 Sep 2008 11:34:47 +0000
(11:34 +0000)
// fold (sub c1, c2) -> c1-c2
from a no-op into an actual transformation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55886
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 2d400bdfb2556064642a6e03c81b470474ce4751..4e4984789bcca92270a0d1fdee1950999b5ef4ea 100644
(file)
--- a/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/
lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@
-1111,7
+1111,7
@@
SDValue DAGCombiner::visitSUB(SDNode *N) {
return DAG.getConstant(0, N->getValueType(0));
// fold (sub c1, c2) -> c1-c2
if (N0C && N1C)
- return DAG.get
Node(ISD::SUB, VT, N0, N1
);
+ return DAG.get
Constant(N0C->getAPIntValue() - N1C->getAPIntValue(), VT
);
// fold (sub x, c) -> (add x, -c)
if (N1C)
return DAG.getNode(ISD::ADD, VT, N0,