[llvm-commits] CVS: llvm/lib/Target/TargetLowering.cpp

Chris Lattner lattner at cs.uiuc.edu
Sun Mar 12 22:42:28 PST 2006



Changes in directory llvm/lib/Target:

TargetLowering.cpp updated: 1.44 -> 1.45
---
Log message:

I can't convince myself that this is safe, remove the recursive call.


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

 TargetLowering.cpp |   20 ++------------------
 1 files changed, 2 insertions(+), 18 deletions(-)


Index: llvm/lib/Target/TargetLowering.cpp
diff -u llvm/lib/Target/TargetLowering.cpp:1.44 llvm/lib/Target/TargetLowering.cpp:1.45
--- llvm/lib/Target/TargetLowering.cpp:1.44	Sun Mar  5 13:52:57 2006
+++ llvm/lib/Target/TargetLowering.cpp	Mon Mar 13 00:42:16 2006
@@ -565,23 +565,6 @@
     break;
   }
   case ISD::ADD:
-    if (ConstantSDNode *AA = dyn_cast<ConstantSDNode>(Op.getOperand(1))) {
-      if (SimplifyDemandedBits(Op.getOperand(0), DemandedMask, KnownZero, 
-                               KnownOne, TLO, Depth+1))
-        return true;
-      // Compute the KnownOne/KnownZero masks for the constant, so we can set
-      // KnownZero appropriately if we're adding a constant that has all low
-      // bits cleared.
-      ComputeMaskedBits(Op.getOperand(1), 
-                        MVT::getIntVTBitMask(Op.getValueType()), 
-                        KnownZero2, KnownOne2, Depth+1);
-      
-      uint64_t KnownZeroOut = std::min(CountTrailingZeros_64(~KnownZero), 
-                                       CountTrailingZeros_64(~KnownZero2));
-      KnownZero = (1ULL << KnownZeroOut) - 1;
-      KnownOne = 0;
-    }
-    break;
   case ISD::SUB:
     // Just use ComputeMaskedBits to compute output bits, there are no
     // simplifications that can be done here, and sub always demands all input
@@ -843,7 +826,8 @@
     assert((KnownZero2 & KnownOne2) == 0 && "Bits known to be one AND zero?"); 
     
     // Output known-0 bits are known if clear or set in both the low clear bits
-    // common to both LHS & RHS;
+    // common to both LHS & RHS.  For example, 8+(X<<3) is known to have the
+    // low 3 bits clear.
     uint64_t KnownZeroOut = std::min(CountTrailingZeros_64(~KnownZero), 
                                      CountTrailingZeros_64(~KnownZero2));
     






More information about the llvm-commits mailing list