[PATCH] D80163: [X86][VARARG] Avoid spilling xmm registers for va_start.
Alexey Lapshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 2 06:35:47 PST 2021
avl added inline comments.
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:3490
+ // VASTART_SAVE_XMM_REGS to avoid unneccessary spilling.
+ TheMachineFunction.getRegInfo().addLiveIn(Reg);
+ LiveXMMRegs.push_back(DAG.getRegister(Reg, MVT::v4f32));
----------------
pengfei wrote:
> Does the change affect GreedyRA?
Yes, it does. GreedyRA might have the same problem if it would generate a spill in entry block for the xmm varargs. Though, it would probably be some specific artificial case(in contrast to FastRA which always spills live ranges on the block boundary).
================
Comment at: llvm/test/CodeGen/X86/xmm-vararg-noopt.ll:1
+; RUN: llc -O0 -mtriple=x86_64-unknown-unknown < %s | FileCheck %s
+
----------------
pengfei wrote:
> Maybe we can also generate the test by update_llc_test_checks?
Ok, will do that way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D80163/new/
https://reviews.llvm.org/D80163
More information about the llvm-commits
mailing list