From e44e082d851dec64a38186c941a710534de47935 Mon Sep 17 00:00:00 2001 From: Roland Froese Date: Tue, 24 Sep 2024 21:13:47 +0000 Subject: [PATCH] MemBits --- llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp index 00dd8d1e2cded9..bc76cf1bfad962 100644 --- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp @@ -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; }