mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 22:24:07 +00:00
Reduce code duplication resulting from the ConstantVector/ConstantDataVector split.
No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201344 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -5496,13 +5496,9 @@ LoopVectorizationCostModel::getInstructionCost(Instruction *I, unsigned VF) {
|
||||
// Check for a splat of a constant or for a non uniform vector of constants.
|
||||
if (isa<ConstantInt>(Op2))
|
||||
Op2VK = TargetTransformInfo::OK_UniformConstantValue;
|
||||
else if (ConstantDataVector *CDV = dyn_cast<ConstantDataVector>(Op2)) {
|
||||
else if (isa<ConstantVector>(Op2) || isa<ConstantDataVector>(Op2)) {
|
||||
Op2VK = TargetTransformInfo::OK_NonUniformConstantValue;
|
||||
if (CDV->getSplatValue() != NULL)
|
||||
Op2VK = TargetTransformInfo::OK_UniformConstantValue;
|
||||
} else if (ConstantVector *CV = dyn_cast<ConstantVector>(Op2)) {
|
||||
Op2VK = TargetTransformInfo::OK_NonUniformConstantValue;
|
||||
if (CV->getSplatValue() != NULL)
|
||||
if (cast<Constant>(Op2)->getSplatValue() != NULL)
|
||||
Op2VK = TargetTransformInfo::OK_UniformConstantValue;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user