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

Chris Lattner sabre at nondot.org
Sat Dec 22 13:26:52 PST 2007


Author: lattner
Date: Sat Dec 22 15:26:52 2007
New Revision: 45322

URL: http://llvm.org/viewvc/llvm-project?rev=45322&view=rev
Log:
improve support for fgetsign

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=45322&r1=45321&r2=45322&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAG.cpp Sat Dec 22 15:26:52 2007
@@ -1323,6 +1323,11 @@
     KnownZero |= (~InMask) & Mask;
     return;
   }
+  case ISD::FGETSIGN:
+    // All bits are zero except the low bit.
+    KnownZero = MVT::getIntVTBitMask(Op.getValueType()) ^ 1;
+    return;
+  
   case ISD::ADD: {
     // If either the LHS or the RHS are Zero, the result is zero.
     ComputeMaskedBits(Op.getOperand(1), Mask, KnownZero, KnownOne, Depth+1);
@@ -3703,6 +3708,7 @@
   case ISD::FDIV:   return "fdiv";
   case ISD::FREM:   return "frem";
   case ISD::FCOPYSIGN: return "fcopysign";
+  case ISD::FGETSIGN:  return "fgetsign";
 
   case ISD::SETCC:       return "setcc";
   case ISD::SELECT:      return "select";





More information about the llvm-commits mailing list