Skip to content

Commit 0f5c06e

Browse files
fixup! fix test and change threshold
1 parent ad0a1ec commit 0f5c06e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/lib/Target/RISCV/RISCVRegisterInfo.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ struct RISCVRegisterInfo : public RISCVGenRegisterInfo {
6363

6464
unsigned getCSRFirstUseCost() const override {
6565
// The cost will be compared against BlockFrequency where entry has the
66-
// value of 1 << 14. A value of 64 will choose to spill or split cold
66+
// value of 1 << 14. A value of 5 will choose to spill or split cold
6767
// path instead of using a callee-saved register.
68-
return 64;
68+
return 5;
6969
}
7070

7171
const MCPhysReg *getCalleeSavedRegs(const MachineFunction *MF) const override;

llvm/test/CodeGen/RISCV/csr-first-use-cost.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2-
; RUN: llc %s -mtriple=riscv64 -regalloc-csr-first-time-cost=0 | FileCheck %s -check-prefix=ZERO-COST
3-
; RUN: llc %s -mtriple=riscv64 | FileCheck %s -check-prefix=DEFAULT-COST
2+
; RUN: llc -mtriple=riscv64 -regalloc-csr-first-time-cost=0 < %s | FileCheck %s -check-prefix=ZERO-COST
3+
; RUN: llc -mtriple=riscv64 < %s | FileCheck %s -check-prefix=DEFAULT-COST
44

55
define fastcc void @Perl_sv_setnv(i8 %c, ptr %.str.54.3682) nounwind {
66
; ZERO-COST-LABEL: Perl_sv_setnv:

0 commit comments

Comments
 (0)