[llvm-commits] [llvm] r152499 - /llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Bill Wendling isanbard at gmail.com
Sat Mar 10 10:20:56 PST 2012


Author: void
Date: Sat Mar 10 12:20:55 2012
New Revision: 152499

URL: http://llvm.org/viewvc/llvm-project?rev=152499&view=rev
Log:
As Duncan pointed out, pointers tend not to be in floating point format...for now.

Modified:
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=152499&r1=152498&r2=152499&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Sat Mar 10 12:20:55 2012
@@ -1610,30 +1610,30 @@
       // If both sides are different identified objects, they aren't equal
       // unless they're null.
       if (LHSPtr != RHSPtr && llvm::isIdentifiedObject(RHSPtr) &&
-          (Pred == CmpInst::ICMP_EQ || Pred == CmpInst::FCMP_UEQ))
+          Pred == CmpInst::ICMP_EQ)
         return ConstantInt::get(ITy, false);
 
       // A local identified object (alloca or noalias call) can't equal any
       // incoming argument, unless they're both null.
       if (isa<Instruction>(LHSPtr) && isa<Argument>(RHSPtr) &&
-          (Pred == CmpInst::ICMP_EQ || Pred == CmpInst::FCMP_UEQ))
+          Pred == CmpInst::ICMP_EQ)
         return ConstantInt::get(ITy, false);
     }
 
     // Assume that the constant null is on the right.
     if (llvm::isKnownNonNull(LHSPtr) && isa<ConstantPointerNull>(RHSPtr)) {
-      if (Pred == CmpInst::ICMP_EQ || Pred == CmpInst::FCMP_UEQ)
+      if (Pred == CmpInst::ICMP_EQ)
         return ConstantInt::get(ITy, false);
-      else if (Pred == CmpInst::ICMP_NE || Pred == CmpInst::FCMP_ONE)
+      else if (Pred == CmpInst::ICMP_NE)
         return ConstantInt::get(ITy, true);
     }
   } else if (isa<Argument>(LHSPtr)) {
     RHSPtr = RHSPtr->stripInBoundsOffsets();
     // An alloca can't be equal to an argument.
     if (isa<AllocaInst>(RHSPtr)) {
-      if (Pred == CmpInst::ICMP_EQ || Pred == CmpInst::FCMP_UEQ)
+      if (Pred == CmpInst::ICMP_EQ)
         return ConstantInt::get(ITy, false);
-      else if (Pred == CmpInst::ICMP_NE || Pred == CmpInst::FCMP_ONE)
+      else if (Pred == CmpInst::ICMP_NE)
         return ConstantInt::get(ITy, true);
     }
   }





More information about the llvm-commits mailing list