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

Chris Lattner sabre at nondot.org
Thu May 17 11:19:41 PDT 2007



Changes in directory llvm/lib/CodeGen/SelectionDAG:

TargetLowering.cpp updated: 1.114 -> 1.115
---
Log message:

disable MaskedValueIsZero, ComputeMaskedBits, and SimplifyDemandedBits for
i128 integers.  The 64-bit masks are not wide enough to represent the results.
These should be converted to APInt someday.


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

 TargetLowering.cpp |   13 +++++++++++++
 1 files changed, 13 insertions(+)


Index: llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.114 llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.115
--- llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp:1.114	Wed May 16 18:45:53 2007
+++ llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp	Thu May 17 13:19:23 2007
@@ -365,6 +365,11 @@
                                           TargetLoweringOpt &TLO,
                                           unsigned Depth) const {
   KnownZero = KnownOne = 0;   // Don't know anything.
+
+  // The masks are not wide enough to represent this type!  Should use APInt.
+  if (Op.getValueType() == MVT::i128)
+    return false;
+  
   // Other users may use these bits.
   if (!Op.Val->hasOneUse()) { 
     if (Depth != 0) {
@@ -874,6 +879,10 @@
 /// for bits that V cannot have.
 bool TargetLowering::MaskedValueIsZero(SDOperand Op, uint64_t Mask, 
                                        unsigned Depth) const {
+  // The masks are not wide enough to represent this type!  Should use APInt.
+  if (Op.getValueType() == MVT::i128)
+    return false;
+  
   uint64_t KnownZero, KnownOne;
   ComputeMaskedBits(Op, Mask, KnownZero, KnownOne, Depth);
   assert((KnownZero & KnownOne) == 0 && "Bits known to be one AND zero?"); 
@@ -891,6 +900,10 @@
   if (Depth == 6 || Mask == 0)
     return;  // Limit search depth.
   
+  // The masks are not wide enough to represent this type!  Should use APInt.
+  if (Op.getValueType() == MVT::i128)
+    return;
+  
   uint64_t KnownZero2, KnownOne2;
 
   switch (Op.getOpcode()) {






More information about the llvm-commits mailing list