forked from OSchip/llvm-project
parent
53ccab7d1c
commit
7ccec09252
|
@ -1423,7 +1423,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||||
switch (II->getIntrinsicID()) {
|
switch (II->getIntrinsicID()) {
|
||||||
case Intrinsic::bswap:
|
case Intrinsic::bswap:
|
||||||
Worklist.Add(II);
|
Worklist.Add(II);
|
||||||
ICI.setOperand(0, II->getOperand(1));
|
ICI.setOperand(0, II->getArgOperand(0));
|
||||||
ICI.setOperand(1, ConstantInt::get(II->getContext(), RHSV.byteSwap()));
|
ICI.setOperand(1, ConstantInt::get(II->getContext(), RHSV.byteSwap()));
|
||||||
return &ICI;
|
return &ICI;
|
||||||
case Intrinsic::ctlz:
|
case Intrinsic::ctlz:
|
||||||
|
@ -1431,7 +1431,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||||
// ctz(A) == bitwidth(a) -> A == 0 and likewise for !=
|
// ctz(A) == bitwidth(a) -> A == 0 and likewise for !=
|
||||||
if (RHSV == RHS->getType()->getBitWidth()) {
|
if (RHSV == RHS->getType()->getBitWidth()) {
|
||||||
Worklist.Add(II);
|
Worklist.Add(II);
|
||||||
ICI.setOperand(0, II->getOperand(1));
|
ICI.setOperand(0, II->getArgOperand(0));
|
||||||
ICI.setOperand(1, ConstantInt::get(RHS->getType(), 0));
|
ICI.setOperand(1, ConstantInt::get(RHS->getType(), 0));
|
||||||
return &ICI;
|
return &ICI;
|
||||||
}
|
}
|
||||||
|
@ -1440,7 +1440,7 @@ Instruction *InstCombiner::visitICmpInstWithInstAndIntCst(ICmpInst &ICI,
|
||||||
// popcount(A) == 0 -> A == 0 and likewise for !=
|
// popcount(A) == 0 -> A == 0 and likewise for !=
|
||||||
if (RHS->isZero()) {
|
if (RHS->isZero()) {
|
||||||
Worklist.Add(II);
|
Worklist.Add(II);
|
||||||
ICI.setOperand(0, II->getOperand(1));
|
ICI.setOperand(0, II->getArgOperand(0));
|
||||||
ICI.setOperand(1, RHS);
|
ICI.setOperand(1, RHS);
|
||||||
return &ICI;
|
return &ICI;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue