[llvm-commits] [llvm] r46383 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Chris Lattner sabre at nondot.org
Fri Jan 25 17:05:42 PST 2008


Author: lattner
Date: Fri Jan 25 19:05:42 2008
New Revision: 46383

URL: http://llvm.org/viewvc/llvm-project?rev=46383&view=rev
Log:
don't bother making x&-1 only to simplify it in dag combine.  This commonly occurs expanding i64 ops.

Modified:
    llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp?rev=46383&r1=46382&r2=46383&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Fri Jan 25 19:05:42 2008
@@ -1877,6 +1877,8 @@
     // worth handling here.
     if (N2C && N2C->getValue() == 0)
       return N2;
+    if (N2C && N2C->isAllOnesValue())  // X & -1 -> X
+      return N1;
     break;
   case ISD::OR:
   case ISD::XOR:





More information about the llvm-commits mailing list