aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-06 00:06:25 +0000
committerChris Lattner <sabre@nondot.org>2009-01-06 00:06:25 +0000
commitb9f08a00af689eb54d25f4cec9a71899d1984f56 (patch)
tree3f33b05c87794f03f0fc73596a7689ce75838faf /include/llvm
parent159c35b3ee500b521d682cf585e61dea2858d0dc (diff)
downloadexternal_llvm-b9f08a00af689eb54d25f4cec9a71899d1984f56.zip
external_llvm-b9f08a00af689eb54d25f4cec9a71899d1984f56.tar.gz
external_llvm-b9f08a00af689eb54d25f4cec9a71899d1984f56.tar.bz2
no need to negate the APInt for 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61777 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r--include/llvm/Support/PatternMatch.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/llvm/Support/PatternMatch.h b/include/llvm/Support/PatternMatch.h
index 98964eb..1cc5995 100644
--- a/include/llvm/Support/PatternMatch.h
+++ b/include/llvm/Support/PatternMatch.h
@@ -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