mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-01 16:26:29 +00:00
Allow vectorization of division by uniform power of 2.
This patch adds support to recognize division by uniform power of 2 and modifies the cost table to vectorize division by uniform power of 2 whenever possible. Updates Cost model for Loop and SLP Vectorizer.The cost table is currently only updated for X86 backend. Thanks to Hal, Andrea, Sanjay for the review. (http://reviews.llvm.org/D4971) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216371 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -104,7 +104,8 @@ public:
|
||||
unsigned getMaximumUnrollFactor() const override;
|
||||
unsigned getRegisterBitWidth(bool Vector) const override;
|
||||
unsigned getArithmeticInstrCost(unsigned Opcode, Type *Ty, OperandValueKind,
|
||||
OperandValueKind) const override;
|
||||
OperandValueKind, OperandValueProperties,
|
||||
OperandValueProperties) const override;
|
||||
unsigned getShuffleCost(ShuffleKind Kind, Type *Tp,
|
||||
int Index, Type *SubTp) const override;
|
||||
unsigned getCastInstrCost(unsigned Opcode, Type *Dst,
|
||||
@@ -289,8 +290,9 @@ unsigned BasicTTI::getMaximumUnrollFactor() const {
|
||||
}
|
||||
|
||||
unsigned BasicTTI::getArithmeticInstrCost(unsigned Opcode, Type *Ty,
|
||||
OperandValueKind,
|
||||
OperandValueKind) const {
|
||||
OperandValueKind, OperandValueKind,
|
||||
OperandValueProperties,
|
||||
OperandValueProperties) const {
|
||||
// Check if any of the operands are vector operands.
|
||||
const TargetLoweringBase *TLI = getTLI();
|
||||
int ISD = TLI->InstructionOpcodeToISD(Opcode);
|
||||
|
Reference in New Issue
Block a user