-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
X86 make check has a bunch of machine verifier errors #27855
Comments
CodeGen/X86/cleanuppad-inalloca.ll is a fun one. The inalloca attribute says that the callee will make the alloca, but the caller will clean it. That would take a bit of effort because currently the only requirement for the frame setup and frame destroy instructions is to haveone immediate operand. Thus, we need to update all the backends and lowering to make this two. |
Fix test/CodeGen/X86/cmpxchg-clobber-flags.ll in r267623. (+ some preparatory patches in r267621 and r267622.) The problem was that we were saving a dead register and the verifier requires to have an undef flag to mark that we know we are reading an undef value. |
Fixed CodeGen/X86/cxx_tlscc64.ll in r267797. We need to glue the callseq_end to the tlscall, otherwise the target independent code sets a dead flag on the result register whereas it is not dead. Indeed, the target independent code walks the chain of glue to find the users of physical registers. |
Fixed CodeGen/X86/fast-isel-nontemporal.ll in r267806. We were using the wrong register class for source of the non-temporal store: FR32 instead of FR128. This did not cause any problem because contain the same registers behind the scene. |
Partially fixed test/CodeGen/X86/implicit-null-check.ll in r267817 and r268327. The problems were respectively that we were missing to update the liveness properply and that we failed to mark FAULTING_LOAD_OP as potential branch instructions. We still have machine verifier failures on that tests though. |
Fixed the final problem with implicit-null-cheks.ll in r268412. When I fixed the liveness update, I did not take into account that load instructions might have implicit-defs as well. |
Fixed x86-interrupt_vzeroupper.ll in r268983. This one was pretty bad because we basically ended up having the AVX512 registers as callee saved registers whereas the target was not using AVX512!! |
I think this fixes llvm/llvm-bugzilla-archive#26409 as well? |
That may indeed be the case. |
Here is where we are now: (Plus the inalloca tests that I analyzed previously but did not fix.) |
A candidate fix for these is at: https://reviews.llvm.org/D23276 |
The stack folding tests are now fixed. The remaining issues are: Failing Tests (16): |
Current failing tests:
|
Failing Tests (19): |
Candidate Fix: https://reviews.llvm.org/D31200 |
Fixed fast-isel-select-sse.ll by rL298805. Failing Tests (18): |
For the inalloca tests, we have a candidate fix by Serge Pavlov: Reviewers needed! |
Serge's alloca fix landed at rL302527. Failing Tests (9): |
CC'ing Igor as he added the GlobalISel tests recently Current failing tests: |
GlobalISel tests fixed in r303502. |
Thanks Igor. Failing tests:
|
r304320 enabled the machine verifier by default with EXPENSIVE_CHECKS. X86 is one of the targets excluded from this by overriding TargetMachine::isMachineVerifierClean() to return false. Please remove the override when the target at least passes all lit tests without machine verifier failure. |
Updated list, as it's been a while: Failing Tests (14): |
Failing Tests (24): |
@jpaquette Any idea whats behind the machine outliner test failures? e.g. After Machine OutlinerMachine code for function f1: NoPHIs, TracksLiveness, NoVRegsFrame Objects: bb.0.entry: End machine code for function f1.*** Bad machine code: Using an undefined physical register ***
error: command failed with exit status: 1 |
Possible fix: https://reviews.llvm.org/D49295 |
Possible fix for the tail call outliner issue as well: https://reviews.llvm.org/D49299 |
I think Francis' fixes should resolve the outliner failures once he lands them. |
Failing Tests (28): |
After r345197 I see only 20 failures: Failing Tests (20): And I have a fix for retpoline in flight: Now that we're down to such a small number, maybe we should explicitly annotate just the failing tests as -verify-machineinstrs=0, and mark the x86 target as machine verifier clean to prevent regressions? |
Marking fixed. Separately, I was wondering if maybe the machine verifier should be enabled somehow in +asserts builds, or controlled by some llc flag that's always set when lit calls llc, so that we get earlier detection of issues. |
mentioned in issue llvm/llvm-bugzilla-archive#30998 |
mentioned in issue #31494 |
mentioned in issue #32375 |
mentioned in issue #37495 |
mentioned in issue #37498 |
mentioned in issue #37724 |
mentioned in issue #37739 |
mentioned in issue #38784 |
mentioned in issue #38785 |
mentioned in issue #38788 |
mentioned in issue #38787 |
mentioned in issue #38800 |
mentioned in issue #38799 |
mentioned in issue #38829 |
Extended Description
Switching the machine verifier ON by default (lib/CodeGen/Passes.cpp then change the default value of the cl::opt related to the machine verifier) leads to a bunch of machine verifier errors for make check:
LLVM :: CodeGen/X86/cleanuppad-inalloca.ll
LLVM :: CodeGen/X86/cmpxchg-clobber-flags.ll
LLVM :: CodeGen/X86/cxx_tlscc64.ll
LLVM :: CodeGen/X86/darwin-tls.ll
LLVM :: CodeGen/X86/fast-isel-nontemporal.ll
LLVM :: CodeGen/X86/i386-tlscall-fastregalloc.ll
LLVM :: CodeGen/X86/implicit-null-check.ll
LLVM :: CodeGen/X86/inalloca-ctor.ll
LLVM :: CodeGen/X86/inalloca-invoke.ll
LLVM :: CodeGen/X86/inalloca-regparm.ll
LLVM :: CodeGen/X86/inalloca-stdcall.ll
LLVM :: CodeGen/X86/inalloca.ll
LLVM :: CodeGen/X86/machine-sink-and-implicit-null-checks.ll
LLVM :: CodeGen/X86/musttail-indirect.ll
LLVM :: CodeGen/X86/musttail-thiscall.ll
LLVM :: CodeGen/X86/musttail-varargs.ll
LLVM :: CodeGen/X86/peephole-na-phys-copy-folding.ll
LLVM :: CodeGen/X86/pku.ll
LLVM :: CodeGen/X86/rtm.ll
LLVM :: CodeGen/X86/scheduler-backtracking.ll
LLVM :: CodeGen/X86/shrink-wrap-chkstk.ll
LLVM :: CodeGen/X86/sibcall-2.ll
LLVM :: CodeGen/X86/sibcall.ll
LLVM :: CodeGen/X86/stack-folding-fp-avx1.ll
LLVM :: CodeGen/X86/stack-folding-fp-sse42.ll
LLVM :: CodeGen/X86/tls-models.ll
LLVM :: CodeGen/X86/tlv-1.ll
LLVM :: CodeGen/X86/tlv-2.ll
LLVM :: CodeGen/X86/win_coreclr_chkstk.ll
LLVM :: CodeGen/X86/x32-function_pointer-1.ll
LLVM :: CodeGen/X86/x86-64-stack-and-frame-ptr.ll
LLVM :: CodeGen/X86/x86-interrupt_vzeroupper.ll
LLVM :: CodeGen/X86/x86-shrink-wrapping.ll
This may be latent bugs.
The text was updated successfully, but these errors were encountered: