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

Chris Lattner lattner at cs.uiuc.edu
Sat Mar 25 14:59:41 PST 2006



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.282 -> 1.283
---
Log message:

Fix a bug in ISD::isBuildVectorAllOnesInteger that  caused it to always return
false


---
Diffs of the changes:  (+3 -2)

 SelectionDAG.cpp |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.282 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.283
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.282	Sat Mar 25 16:57:01 2006
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Sat Mar 25 16:59:28 2006
@@ -86,12 +86,13 @@
   
   // Do not accept build_vectors that aren't all constants or which have non-~0
   // elements.
-  if (!isa<ConstantSDNode>(N) || !cast<ConstantSDNode>(N)->isAllOnesValue())
+  SDOperand NotZero = N->getOperand(i);
+  if (!isa<ConstantSDNode>(NotZero) ||
+      !cast<ConstantSDNode>(NotZero)->isAllOnesValue())
     return false;
   
   // Okay, we have at least one ~0 value, check to see if the rest match or are
   // undefs.
-  SDOperand NotZero = N->getOperand(i);
   for (++i; i != e; ++i)
     if (N->getOperand(i) != NotZero &&
         N->getOperand(i).getOpcode() != ISD::UNDEF)






More information about the llvm-commits mailing list