forked from OSchip/llvm-project
[SLP] Fix case of variable name. NFCI.
This commit is contained in:
parent
8461995d35
commit
4fd0addb68
|
@ -4074,26 +4074,26 @@ InstructionCost BoUpSLP::getEntryCost(const TreeEntry *E,
|
||||||
}
|
}
|
||||||
case Instruction::Load: {
|
case Instruction::Load: {
|
||||||
// Cost of wide load - cost of scalar loads.
|
// Cost of wide load - cost of scalar loads.
|
||||||
Align alignment = cast<LoadInst>(VL0)->getAlign();
|
Align Alignment = cast<LoadInst>(VL0)->getAlign();
|
||||||
InstructionCost ScalarEltCost = TTI->getMemoryOpCost(
|
InstructionCost ScalarEltCost = TTI->getMemoryOpCost(
|
||||||
Instruction::Load, ScalarTy, alignment, 0, CostKind, VL0);
|
Instruction::Load, ScalarTy, Alignment, 0, CostKind, VL0);
|
||||||
if (NeedToShuffleReuses) {
|
if (NeedToShuffleReuses) {
|
||||||
ReuseShuffleCost -= (ReuseShuffleNumbers - VL.size()) * ScalarEltCost;
|
ReuseShuffleCost -= (ReuseShuffleNumbers - VL.size()) * ScalarEltCost;
|
||||||
}
|
}
|
||||||
InstructionCost ScalarLdCost = VecTy->getNumElements() * ScalarEltCost;
|
InstructionCost ScalarLdCost = VecTy->getNumElements() * ScalarEltCost;
|
||||||
InstructionCost VecLdCost;
|
InstructionCost VecLdCost;
|
||||||
if (E->State == TreeEntry::Vectorize) {
|
if (E->State == TreeEntry::Vectorize) {
|
||||||
VecLdCost = TTI->getMemoryOpCost(Instruction::Load, VecTy, alignment, 0,
|
VecLdCost = TTI->getMemoryOpCost(Instruction::Load, VecTy, Alignment, 0,
|
||||||
CostKind, VL0);
|
CostKind, VL0);
|
||||||
} else {
|
} else {
|
||||||
assert(E->State == TreeEntry::ScatterVectorize && "Unknown EntryState");
|
assert(E->State == TreeEntry::ScatterVectorize && "Unknown EntryState");
|
||||||
Align CommonAlignment = alignment;
|
Align CommonAlignment = Alignment;
|
||||||
for (Value *V : VL)
|
for (Value *V : VL)
|
||||||
CommonAlignment =
|
CommonAlignment =
|
||||||
commonAlignment(CommonAlignment, cast<LoadInst>(V)->getAlign());
|
commonAlignment(CommonAlignment, cast<LoadInst>(V)->getAlign());
|
||||||
VecLdCost = TTI->getGatherScatterOpCost(
|
VecLdCost = TTI->getGatherScatterOpCost(
|
||||||
Instruction::Load, VecTy, cast<LoadInst>(VL0)->getPointerOperand(),
|
Instruction::Load, VecTy, cast<LoadInst>(VL0)->getPointerOperand(),
|
||||||
/*VariableMask=*/false, alignment, CostKind, VL0);
|
/*VariableMask=*/false, Alignment, CostKind, VL0);
|
||||||
}
|
}
|
||||||
if (!NeedToShuffleReuses && !E->ReorderIndices.empty()) {
|
if (!NeedToShuffleReuses && !E->ReorderIndices.empty()) {
|
||||||
SmallVector<int> NewMask;
|
SmallVector<int> NewMask;
|
||||||
|
|
Loading…
Reference in New Issue