summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-04-13 19:41:05 +0000
committerChris Lattner <sabre@nondot.org>2005-04-13 19:41:05 +0000
commit8c3d409dc7bd29209301f010d710bd56f7c70c79 (patch)
tree605de9463e63cca8ecb1a489dd2f1e6fe8974924 /llvm/lib/CodeGen
parent93341a0f8296055c813810928c8d1f0dc997e80f (diff)
downloadbcm5719-llvm-8c3d409dc7bd29209301f010d710bd56f7c70c79.tar.gz
bcm5719-llvm-8c3d409dc7bd29209301f010d710bd56f7c70c79.zip
avoid work when possible, perhaps fix the problem nate and andrew are seeing
with != 0 comparisons vanishing. llvm-svn: 21287
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 48e0f7bc9ad..4b3064593c7 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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()));
OpenPOWER on IntegriCloud