if (Instruction *LHS = dyn_cast<Instruction>(CI->getOperand(0)))
if (LHS->getOpcode() == Instruction::And)
if (ConstantInt *AndRHS = dyn_cast<ConstantInt>(LHS->getOperand(1)))
- if (AndRHS->getUniqueInteger().isPowerOf2())
+ if (AndRHS->getValue().isPowerOf2())
return false;
// Check if the LHS is the return value of a library function
Optional<APInt> asConstantInteger() const {
if (isConstant() && isa<ConstantInt>(Val)) {
- return Val->getUniqueInteger();
+ return cast<ConstantInt>(Val)->getValue();
} else if (isConstantRange() && Range.isSingleElement()) {
return *Range.getSingleElement();
}
if (auto *C = dyn_cast_or_null<ConstantInt>(
SimplifyCastInst(CI->getOpcode(), OpConst,
CI->getDestTy(), DL))) {
- return LVILatticeVal::getRange(ConstantRange(C->getUniqueInteger()));
+ return LVILatticeVal::getRange(ConstantRange(C->getValue()));
}
} else if (auto *BO = dyn_cast<BinaryOperator>(Val)) {
bool Op0Match = BO->getOperand(0) == Op;
Value *RHS = Op1Match ? OpConst : BO->getOperand(1);
if (auto *C = dyn_cast_or_null<ConstantInt>(
SimplifyBinOp(BO->getOpcode(), LHS, RHS, DL))) {
- return LVILatticeVal::getRange(ConstantRange(C->getUniqueInteger()));
+ return LVILatticeVal::getRange(ConstantRange(C->getValue()));
}
}
return LVILatticeVal::getOverdefined();
ConstantInt* Mask = dyn_cast<ConstantInt>(AndI.getOperand(1));
if (!Mask)
return false;
- return Mask->getUniqueInteger().isPowerOf2();
+ return Mask->getValue().isPowerOf2();
}
void AArch64TargetLowering::initializeSplitCSR(MachineBasicBlock *Entry) const {