aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Scalar/Reassociate.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-07-15 06:08:15 +0000
committerChris Lattner <sabre@nondot.org>2011-07-15 06:08:15 +0000
commitb1a151211919a00d73c441e944271dd820884152 (patch)
treef5ba1bccea2ccd4e08c9c6d9b0ca3dd4a4b79d0d /llvm/lib/Transforms/Scalar/Reassociate.cpp
parentede26958bf583d3a87f8885b3e3aa881df4d00f2 (diff)
downloadllvm-b1a151211919a00d73c441e944271dd820884152.zip
llvm-b1a151211919a00d73c441e944271dd820884152.tar.gz
llvm-b1a151211919a00d73c441e944271dd820884152.tar.bz2
start using the new helper methods a bit.
llvm-svn: 135251
Diffstat (limited to 'llvm/lib/Transforms/Scalar/Reassociate.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/Reassociate.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp
index c1dfe15..e6341ae 100644
--- a/llvm/lib/Transforms/Scalar/Reassociate.cpp
+++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp
@@ -812,7 +812,7 @@ Value *Reassociate::OptimizeAdd(Instruction *I,
// because we can percolate the negate out. Watch for minint, which
// cannot be positivified.
if (ConstantInt *CI = dyn_cast<ConstantInt>(Factor))
- if (CI->getValue().isNegative() && !CI->getValue().isMinSignedValue()) {
+ if (CI->isNegative() && !CI->isMinValue(true)) {
Factor = ConstantInt::get(CI->getContext(), -CI->getValue());
assert(!Duplicates.count(Factor) &&
"Shouldn't have two constant factors, missed a canonicalize");