summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2011-04-01 22:29:18 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2011-04-01 22:29:18 +0000
commit406a6502377638f76fec46502248aeb65f419f08 (patch)
tree957203d4a63108a94e350ac9f4616f729e888052 /lib
parent5337fabdc4b585acbce8489a71e997d1dd0f6e92 (diff)
downloadllvm-406a6502377638f76fec46502248aeb65f419f08.tar.gz
llvm-406a6502377638f76fec46502248aeb65f419f08.tar.bz2
llvm-406a6502377638f76fec46502248aeb65f419f08.tar.xz
Fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCasts.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp
index 5dd6fe5e27..32ab123f10 100644
--- a/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -883,8 +883,8 @@ Instruction *InstCombiner::transformSExtICmp(ICmpInst *ICI, Instruction &CI) {
ICmpInst::Predicate Pred = ICI->getPredicate();
if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) {
- // (x <s 0) ? -1 : 0 -> ashr x, 31 -> all ones if signed
- // (x >s -1) ? -1 : 0 -> ashr x, 31 -> all ones if not signed
+ // (x <s 0) ? -1 : 0 -> ashr x, 31 -> all ones if negative
+ // (x >s -1) ? -1 : 0 -> not (ashr x, 31) -> all ones if positive
if ((Pred == ICmpInst::ICMP_SLT && Op1C->isZero()) ||
(Pred == ICmpInst::ICMP_SGT && Op1C->isAllOnesValue())) {