[llvm] [X86] Do not elect to tail call if caller must preserve all registers (PR #112098)
Antonio Frighetto via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 00:15:45 PDT 2024
================
@@ -0,0 +1,34 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
+; RUN: llc < %s -mtriple=x86_64-linux-gnu -mattr=-sse,-avx | FileCheck %s
+
+ at .str = private unnamed_addr constant [6 x i8] c"%d %d\00", align 1
+
+define void @caller(i32 %0, i32 %1) #0 {
----------------
antoniofrighetto wrote:
The [attribute semantic](https://clang.llvm.org/docs/AttributeReference.html#no-caller-saved-registers) is slightly different for Clang:
> All registers are callee-saved except for registers used for passing parameters to the function or returning parameters from the function. The compiler saves and restores any modified registers that were not used for passing or returning arguments to the function.
https://github.com/llvm/llvm-project/pull/112098
More information about the llvm-commits
mailing list