[llvm] [RISCV][MRI] Account for fixed registers when determining callee saved regs (PR #115756)
Alexander Richardson via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 13:55:19 PST 2024
================
@@ -0,0 +1,39 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc -mtriple=riscv64 -mattr=+reserve-x24 < %s | FileCheck %s
+
+define noundef signext i32 @foo() {
+; CHECK-LABEL: foo:
+; CHECK: # %bb.0:
+; CHECK-NEXT: li s8, 321
+; CHECK-NEXT: li a0, 0
+; CHECK-NEXT: ret
+ tail call void @llvm.write_register.i64(metadata !0, i64 321)
+ ret i32 0
+}
+
+declare void @llvm.write_register.i64(metadata, i64)
+
+define noundef signext i32 @bar() {
----------------
arichardson wrote:
could add `nounwind` here to remove the .cfi directives from the test.
https://github.com/llvm/llvm-project/pull/115756
More information about the llvm-commits
mailing list