Skip to content

Commit c8a97c0

Browse files
authored
[RISCV] Use hasStdExtCOrZca instead of hasStdExtC in estimateFunctionSizeInBytes. (#80905)
1 parent 091fc81 commit c8a97c0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Target/RISCV/RISCVFrameLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1172,7 +1172,7 @@ static unsigned estimateFunctionSizeInBytes(const MachineFunction &MF,
11721172
if (MI.isConditionalBranch())
11731173
FnSize += TII.getInstSizeInBytes(MI);
11741174
if (MI.isConditionalBranch() || MI.isUnconditionalBranch()) {
1175-
if (MF.getSubtarget<RISCVSubtarget>().hasStdExtC())
1175+
if (MF.getSubtarget<RISCVSubtarget>().hasStdExtCOrZca())
11761176
FnSize += 2 + 8 + 2 + 2;
11771177
else
11781178
FnSize += 4 + 8 + 4 + 4;

0 commit comments

Comments
 (0)