summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2012-05-21 22:39:20 +0000
committerOwen Anderson <resistor@mac.com>2012-05-21 22:39:20 +0000
commitf2118ea826101b6d331d6804f92d3b7bd63359ed (patch)
treecbdb180285f5e1cf47999dfa28b93a035d34df86 /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
parent3e606ea7aeb1ed90c081adfd14e3018968b4092e (diff)
downloadbcm5719-llvm-f2118ea826101b6d331d6804f92d3b7bd63359ed.tar.gz
bcm5719-llvm-f2118ea826101b6d331d6804f92d3b7bd63359ed.zip
Fix use of an unitialized value in the LegalizeOps expansion for ISD::SUB. No in-tree targets exercise this path.
Patch by Micah Villmow. llvm-svn: 157215
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index b8cb897a86f..f77c74b9eb8 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -3064,7 +3064,7 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node) {
"Don't know how to expand this subtraction!");
Tmp1 = DAG.getNode(ISD::XOR, dl, VT, Node->getOperand(1),
DAG.getConstant(APInt::getAllOnesValue(VT.getSizeInBits()), VT));
- Tmp1 = DAG.getNode(ISD::ADD, dl, VT, Tmp2, DAG.getConstant(1, VT));
+ Tmp1 = DAG.getNode(ISD::ADD, dl, VT, Tmp1, DAG.getConstant(1, VT));
Results.push_back(DAG.getNode(ISD::ADD, dl, VT, Node->getOperand(0), Tmp1));
break;
}
OpenPOWER on IntegriCloud