[llvm] [X86] Do not elect to tail call if caller must preserve all registers (PR #112098)
Phoebe Wang via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 01:31:33 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 {
----------------
phoebewang wrote:
Okay, but it also mentions:
> Functions specified with the ‘no_caller_saved_registers’ attribute should only call other functions with the ‘no_caller_saved_registers’ attribute, or should be compiled with the ‘-mgeneral-regs-only’ flag to avoid saving unused non-GPR registers.
So is it a rational scenario? Or we should consider more like https://godbolt.org/z/Eqnh5W1en
https://github.com/llvm/llvm-project/pull/112098
More information about the llvm-commits
mailing list