OSDN Git Service

no need to negate the APInt for 0.
authorChris Lattner <sabre@nondot.org>
Tue, 6 Jan 2009 00:06:25 +0000 (00:06 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 6 Jan 2009 00:06:25 +0000 (00:06 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61777 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/PatternMatch.h

index 98964eb..1cc5995 100644 (file)
@@ -57,7 +57,7 @@ struct constantint_ty {
   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