[llvm] [RISCV] Use hasStdExtCOrZca instead of hasStdExtC in estimateFunctionSizeInBytes. (PR #80905)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 6 13:04:31 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-risc-v
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
I'm not sure how to test this. I commented out the existing hasStdC check and no tests failed.
---
Full diff: https://github.com/llvm/llvm-project/pull/80905.diff
1 Files Affected:
- (modified) llvm/lib/Target/RISCV/RISCVFrameLowering.cpp (+1-1)
``````````diff
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;
``````````
</details>
https://github.com/llvm/llvm-project/pull/80905
More information about the llvm-commits
mailing list