[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Apr 13 12:41:21 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.78 -> 1.79
---
Log message:

avoid work when possible, perhaps fix the problem nate and andrew are seeing
with != 0 comparisons vanishing.


---
Diffs of the changes:  (+1 -0)

 SelectionDAG.cpp |    1 +
 1 files changed, 1 insertion(+)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.78 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.79
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.78	Tue Apr 12 21:58:13 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Wed Apr 13 14:41:05 2005
@@ -286,6 +286,7 @@
 }
 
 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()));






More information about the llvm-commits mailing list