[SystemZ] implement hasDivRemOp()
SystemZ can do division and remainder in a single instruction for scalar integer types, which are now reflected by returning true in this hook for those cases. Review: Ulrich Weigand llvm-svn: 317477
This commit is contained in:
parent
1ac16619d2
commit
e54cc1a436
|
@ -323,6 +323,11 @@ unsigned SystemZTTIImpl::getRegisterBitWidth(bool Vector) const {
|
|||
return 0;
|
||||
}
|
||||
|
||||
bool SystemZTTIImpl::hasDivRemOp(Type *DataType, bool IsSigned) {
|
||||
EVT VT = TLI->getValueType(DL, DataType);
|
||||
return (VT.isScalarInteger() && TLI->isTypeLegal(VT));
|
||||
}
|
||||
|
||||
int SystemZTTIImpl::getArithmeticInstrCost(
|
||||
unsigned Opcode, Type *Ty,
|
||||
TTI::OperandValueKind Op1Info, TTI::OperandValueKind Op2Info,
|
||||
|
|
|
@ -62,6 +62,7 @@ public:
|
|||
unsigned getPrefetchDistance() { return 2000; }
|
||||
unsigned getMinPrefetchStride() { return 2048; }
|
||||
|
||||
bool hasDivRemOp(Type *DataType, bool IsSigned);
|
||||
bool prefersVectorizedAddressing() { return false; }
|
||||
bool LSRWithInstrQueries() { return true; }
|
||||
bool supportsEfficientVectorElementLoadStore() { return true; }
|
||||
|
|
Loading…
Reference in New Issue