Fix an incorrect logic causing instcombine to miss some _chk -> non-chk transformations.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99263 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2010-03-23 06:06:09 +00:00
parent 621f195243
commit 9d8f002d8f
2 changed files with 15 additions and 2 deletions

View File

@@ -766,7 +766,7 @@ protected:
return SizeCI->getZExtValue() >=
GetStringLength(CI->getOperand(SizeArgOp));
if (ConstantInt *Arg = dyn_cast<ConstantInt>(CI->getOperand(SizeArgOp)))
return SizeCI->getZExtValue() <= Arg->getZExtValue();
return SizeCI->getZExtValue() >= Arg->getZExtValue();
}
return false;
}