[PATCH] D118305: [Spill2Reg] Added code generation support for 8/16bit spills/reloads in x86
Vasileios Porpodas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 1 22:25:50 PST 2022
vporpo added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstrInfo.cpp:9587
case 32:
return Insert ? X86::MOVDI2PDIrr : X86::MOVPDI2DIrr;
case 64:
----------------
craig.topper wrote:
> Should use the AVX or AVX512 opcodes when available?
>
> Are you limiting to VR128 regclass or do you allow VR128X with AVX512?
I am trying to avoid the frequency throttling associated with using wide vector instructions. But I guess AVX should be safe ? Not sure about AVX512 though, won't it cause frequency drops if I use that instead?
I am currently using VR128.
================
Comment at: llvm/test/CodeGen/X86/spill2reg_end_to_end_16bit.ll:70
; CHECK-NEXT: .cfi_offset %rbp, -16
-; CHECK-NEXT: movzwl D0(%rip), %eax
-; CHECK-NEXT: movw %ax, {{[-0-9]+}}(%r{{[sb]}}p) # 2-byte Spill
+; CHECK-NEXT: movw D0(%rip), %ax
+; CHECK-NEXT: movd %eax, %xmm3
----------------
craig.topper wrote:
> Why is X86FixupBWInsts.cpp failing to convert this load to movzwl?
XF86FixupBWInsts.cpp:208 checks whether the super reg %eax is live after `movw D0(%rip), %ax`. In the original code it is not live, but in our case it is because movd is reading from %eax. So it bails and does not replace the register.
Hmm not sure how we could fix this though.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118305/new/
https://reviews.llvm.org/D118305
More information about the llvm-commits
mailing list