[llvm] [RISCV][RegAlloc] Add getCSRFirstUseCost for RISC-V (PR #131349)
Alex Bradbury via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 14 09:18:58 PDT 2025
================
@@ -0,0 +1,91 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc %s -mtriple=riscv64 -regalloc-csr-first-time-cost=0 | FileCheck %s -check-prefix=ZERO-COST
+; RUN: llc %s -mtriple=riscv64 -regalloc-csr-first-time-cost=64 | FileCheck %s -check-prefix=SOME-COST
----------------
asb wrote:
Would it be better to not set `-regalloc-csr-first-time-cost` in the cost=64 case and name it `DEFAULT-COST`. Then this test will fail if the default behaviour is changed (e.g. having getCSRFirstUseCost return 0).
https://github.com/llvm/llvm-project/pull/131349
More information about the llvm-commits
mailing list