mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-04-02 15:51:54 +00:00
Fix comment.
llvm-svn: 128745
This commit is contained in:
parent
eb9bd6ed23
commit
d91d0d877e
@ -883,8 +883,8 @@ Instruction *InstCombiner::transformSExtICmp(ICmpInst *ICI, Instruction &CI) {
|
|||||||
ICmpInst::Predicate Pred = ICI->getPredicate();
|
ICmpInst::Predicate Pred = ICI->getPredicate();
|
||||||
|
|
||||||
if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) {
|
if (ConstantInt *Op1C = dyn_cast<ConstantInt>(Op1)) {
|
||||||
// (x <s 0) ? -1 : 0 -> ashr x, 31 -> all ones if signed
|
// (x <s 0) ? -1 : 0 -> ashr x, 31 -> all ones if negative
|
||||||
// (x >s -1) ? -1 : 0 -> ashr x, 31 -> all ones if not signed
|
// (x >s -1) ? -1 : 0 -> not (ashr x, 31) -> all ones if positive
|
||||||
if ((Pred == ICmpInst::ICMP_SLT && Op1C->isZero()) ||
|
if ((Pred == ICmpInst::ICMP_SLT && Op1C->isZero()) ||
|
||||||
(Pred == ICmpInst::ICMP_SGT && Op1C->isAllOnesValue())) {
|
(Pred == ICmpInst::ICMP_SGT && Op1C->isAllOnesValue())) {
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user