[llvm] c8a97c0 - [RISCV] Use hasStdExtCOrZca instead of hasStdExtC in estimateFunctionSizeInBytes. (#80905)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 13:47:40 PST 2024
Author: Craig Topper
Date: 2024-02-06T13:47:36-08:00
New Revision: c8a97c0f30f3da86e892bf68d572068634994a1e
URL: https://github.com/llvm/llvm-project/commit/c8a97c0f30f3da86e892bf68d572068634994a1e
DIFF: https://github.com/llvm/llvm-project/commit/c8a97c0f30f3da86e892bf68d572068634994a1e.diff
LOG: [RISCV] Use hasStdExtCOrZca instead of hasStdExtC in estimateFunctionSizeInBytes. (#80905)
Added:
Modified:
llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
index d793c0b7377ba..745ae68123b08 100644
--- a/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
+++ b/llvm/lib/Target/RISCV/RISCVFrameLowering.cpp
@@ -1172,7 +1172,7 @@ static unsigned estimateFunctionSizeInBytes(const MachineFunction &MF,
if (MI.isConditionalBranch())
FnSize += TII.getInstSizeInBytes(MI);
if (MI.isConditionalBranch() || MI.isUnconditionalBranch()) {
- if (MF.getSubtarget<RISCVSubtarget>().hasStdExtC())
+ if (MF.getSubtarget<RISCVSubtarget>().hasStdExtCOrZca())
FnSize += 2 + 8 + 2 + 2;
else
FnSize += 4 + 8 + 4 + 4;
More information about the llvm-commits
mailing list