Skip to content

Commit

Permalink
MemBits
Browse files Browse the repository at this point in the history
  • Loading branch information
RolandF77 committed Sep 24, 2024
1 parent f004e2b commit e44e082
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,15 +801,15 @@ InstructionCost PPCTTIImpl::getMemoryOpCost(unsigned Opcode, Type *Src,
// PPCTargetLowering can't compute the cost appropriately. So here we
// explicitly check this case. There are also corresponding store
// instructions.
unsigned MemBytes = Src->getPrimitiveSizeInBits();
unsigned MemBits = Src->getPrimitiveSizeInBits();
unsigned SrcBytes = LT.second.getStoreSize();
if (ST->hasVSX() && IsAltivecType) {
if (MemBytes == 64 || (ST->hasP8Vector() && MemBytes == 32))
if (MemBits == 64 || (ST->hasP8Vector() && MemBits == 32))
return 1;

// Use lfiwax/xxspltw
Align AlignBytes = Alignment ? *Alignment : Align(1);
if (Opcode == Instruction::Load && MemBytes == 32 && AlignBytes < SrcBytes)
if (Opcode == Instruction::Load && MemBits == 32 && AlignBytes < SrcBytes)
return 2;
}

Expand Down

0 comments on commit e44e082

Please sign in to comment.