[llvm-commits] [llvm] r128745 - /llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
Benjamin Kramer
benny.kra at googlemail.com
Fri Apr 1 15:29:18 PDT 2011
Author: d0k
Date: Fri Apr 1 17:29:18 2011
New Revision: 128745
URL: http://llvm.org/viewvc/llvm-project?rev=128745&view=rev
Log:
Fix comment.
Modified:
llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp?rev=128745&r1=128744&r2=128745&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCasts.cpp Fri Apr 1 17:29:18 2011
@@ -883,8 +883,8 @@
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())) {
More information about the llvm-commits
mailing list