diff options
author | Chris Lattner <sabre@nondot.org> | 2005-04-13 19:41:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2005-04-13 19:41:05 +0000 |
commit | 51679c430f1c02cea0717bb20d9b7eac84adf9b2 (patch) | |
tree | 4dc79b1c6b3a4ac21a2257dbf14d51eda7472741 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp | |
parent | c24b537399e872378ce117080928bd6c890c85f7 (diff) |
avoid work when possible, perhaps fix the problem nate and andrew are seeing
with != 0 comparisons vanishing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21287 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 48e0f7bc9a..4b3064593c 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -286,6 +286,7 @@ SelectionDAG::~SelectionDAG() { } SDOperand SelectionDAG::getZeroExtendInReg(SDOperand Op, MVT::ValueType VT) { + if (Op.getValueType() == VT) return Op; int64_t Imm = ~0ULL >> 64-MVT::getSizeInBits(VT); return getNode(ISD::AND, Op.getValueType(), Op, getConstant(Imm, Op.getValueType())); |