mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +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:
@@ -99,17 +99,9 @@ static TargetTransformInfo::OperandValueKind getOperandInfo(Value *V) {
|
||||
TargetTransformInfo::OK_AnyValue;
|
||||
|
||||
// Check for a splat of a constant or for a non uniform vector of constants.
|
||||
ConstantDataVector *CDV = 0;
|
||||
if ((CDV = dyn_cast<ConstantDataVector>(V))) {
|
||||
if (isa<ConstantVector>(V) || isa<ConstantDataVector>(V)) {
|
||||
OpInfo = TargetTransformInfo::OK_NonUniformConstantValue;
|
||||
if (CDV->getSplatValue() != NULL)
|
||||
OpInfo = TargetTransformInfo::OK_UniformConstantValue;
|
||||
}
|
||||
|
||||
ConstantVector *CV = 0;
|
||||
if ((CV = dyn_cast<ConstantVector>(V))) {
|
||||
OpInfo = TargetTransformInfo::OK_NonUniformConstantValue;
|
||||
if (CV->getSplatValue() != NULL)
|
||||
if (cast<Constant>(V)->getSplatValue() != NULL)
|
||||
OpInfo = TargetTransformInfo::OK_UniformConstantValue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user