1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

no need to negate the APInt for 0.

llvm-svn: 61777
This commit is contained in:
Chris Lattner 2009-01-06 00:06:25 +00:00
parent 33b4e3aad4
commit ff7c07ce73

View 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