Skip to content

Commit 42e025f

Browse files
committed
[X86] Disable rematerializion for PTILELOADDV
Per the discussion in D97453. We currently disable it due to it's not a common scenario and has some problem in implementation. Differential Revision: https://reviews.llvm.org/D97453
1 parent 42ce00e commit 42e025f

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

llvm/lib/Target/X86/X86InstrAMX.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ let Predicates = [HasAMXTILE, In64BitMode] in {
4848
VEX, T8XD;
4949

5050
// Pseduo instruction for RA.
51-
let isReMaterializable = 1, canFoldAsLoad = 1 in
52-
def PTILELOADDV : PseudoI<(outs TILE: $dst), (ins GR16:$src1,
51+
def PTILELOADDV : PseudoI<(outs TILE: $dst), (ins GR16:$src1,
5352
GR16:$src2,
5453
opaquemem:$src3), []>;
5554
def PTILESTOREDV : PseudoI<(outs), (ins GR16:$src1,

llvm/lib/Target/X86/X86InstrInfo.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,6 @@ bool X86InstrInfo::isReallyTriviallyReMaterializable(const MachineInstr &MI,
10071007
case X86::MOV64ri32:
10081008
case X86::MOV8ri:
10091009
case X86::PTILEZEROV:
1010-
case X86::PTILELOADDV:
10111010
return true;
10121011

10131012
case X86::MOV8rm:

llvm/test/CodeGen/X86/AMX/amx-across-func.ll

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,13 @@ define dso_local i32 @test_loop(i32 %0) nounwind {
131131
; CHECK-NEXT: .p2align 4, 0x90
132132
; CHECK-NEXT: .LBB2_2: # =>This Inner Loop Header: Depth=1
133133
; CHECK-NEXT: tileloadd (%r15,%r12), %tmm0
134+
; CHECK-NEXT: movabsq $64, %rax
135+
; CHECK-NEXT: tilestored %tmm0, 1024(%rsp,%rax) # 1024-byte Folded Spill
134136
; CHECK-NEXT: vzeroupper
135137
; CHECK-NEXT: callq foo
136138
; CHECK-NEXT: ldtilecfg {{[0-9]+}}(%rsp)
137-
; CHECK-NEXT: tileloadd (%r15,%r12), %tmm0
139+
; CHECK-NEXT: movabsq $64, %rax
140+
; CHECK-NEXT: tileloadd 1024(%rsp,%rax), %tmm0 # 1024-byte Folded Reload
138141
; CHECK-NEXT: tilestored %tmm0, (%r13,%r12)
139142
; CHECK-NEXT: callq foo
140143
; CHECK-NEXT: ldtilecfg {{[0-9]+}}(%rsp)

0 commit comments

Comments
 (0)