[llvm-commits] [llvm] r61777 - /llvm/trunk/include/llvm/Support/PatternMatch.h

Chris Lattner sabre at nondot.org
Mon Jan 5 16:06:25 PST 2009


Author: lattner
Date: Mon Jan  5 18:06:25 2009
New Revision: 61777

URL: http://llvm.org/viewvc/llvm-project?rev=61777&view=rev
Log:
no need to negate the APInt for 0.

Modified:
    llvm/trunk/include/llvm/Support/PatternMatch.h

Modified: llvm/trunk/include/llvm/Support/PatternMatch.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/PatternMatch.h?rev=61777&r1=61776&r2=61777&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/PatternMatch.h (original)
+++ llvm/trunk/include/llvm/Support/PatternMatch.h Mon Jan  5 18:06:25 2009
@@ -57,7 +57,7 @@
   bool match(ITy *V) {
     if (const ConstantInt *CI = dyn_cast<ConstantInt>(V)) {
       const APInt &CIV = CI->getValue();
-      if (Val > 0)
+      if (Val >= 0)
         return CIV == Val;
       // If Val is negative, and CI is shorter than it, truncate to the right
       // number of bits.  If it is larger, then we have to sign extend.  Just





More information about the llvm-commits mailing list