OSDN Git Service

[X86] Fix tile register spill issue.
authorLuo, Yuanke <yuanke.luo@intel.com>
Thu, 31 Dec 2020 05:47:42 +0000 (13:47 +0800)
committerLuo, Yuanke <yuanke.luo@intel.com>
Mon, 11 Jan 2021 10:35:09 +0000 (18:35 +0800)
commitc5be0e0cc0e2fca19a5d130b742ae16c66f99111
treeddcfc1b89386118c95c72bb10a176de959fb5d9c
parent1677c86124e5b82a8dbf991f2d5fc450d06db4ad
[X86] Fix tile register spill issue.

The tile register spill need 2 instructions.
%46:gr64_nosp = MOV64ri 64
TILESTORED %stack.2, 1, killed %46:gr64_nosp, 0, $noreg, %43:tile
The first instruction load the stride to a GPR, and the second
instruction store tile register to stack slot. The optimization of merge
spill instruction is done after register allocation. And spill tile
register need create a new virtual register to for stride, so we can't
hoist tile spill instruction in postOptimization() of register
allocation. We can't hoist TILESTORED alone and we can't hoist the 2
instuctions together because MOV64ri will clobber some GPR. This patch
is to disble the spill merge for any spill which need 2 instructions.

Differential Revision: https://reviews.llvm.org/D93898
llvm/lib/CodeGen/InlineSpiller.cpp
llvm/test/CodeGen/X86/AMX/amx-spill-merge.ll [new file with mode: 0644]