This fixes https://github.com/llvm/llvm-project/issues/63615 via TargetLowering::getRegForInlineAsmConstraint() but appears to cause regressions.
I'm currently dealing with the failing tests and crashes.
Paths
| Differential D154225
[X86] Enable the VR512 register class when AVX512 is enabled AbandonedPublic Authored by n-omer on Jun 30 2023, 7:51 AM.
Details
Summary This fixes https://github.com/llvm/llvm-project/issues/63615 via TargetLowering::getRegForInlineAsmConstraint() but appears to cause regressions. I'm currently dealing with the failing tests and crashes.
Diff Detail
Unit TestsFailed Event TimelineComment Actions I think this is not the right fix. We intended to define legal types under useAVX512Regs. This revision now requires changes to proceed.Jun 30 2023, 8:23 AM Comment Actions
I agree with you that this specific fix may not be the right but at the moment when "asked" whether 512 bit types are legal the backend "says" no even though AVX512 is explicitly enabled (see TargetLowering::getRegForInlineAsmConstraint for concrete details), this appears to be the cause of this bug.
I'm not at all familiar with Clang which happens to the front-end in this case but wouldn't the front-end have to ask the backend for this information? Comment Actions
MS inline assembly is fully parsed during the frontend to detect the registers that are written. This adds the ~{zmm6} you can see on the statement in IR. CGStmt.cpp in the frontend updates LargestLegalVectorWidth and thus min-legal-vector-width for inline assembly inputs and outputs, but I missed clobbers.
Revision Contents
Diff 536247 llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512fp16-cvt.ll
llvm/test/CodeGen/X86/pr59800.ll
|