Quuxplusone / LLVMBugzillaTest

0 stars 0 forks source link

PTX make check has a bunch of machine verifier errors #27459

Open Quuxplusone opened 8 years ago

Quuxplusone commented 8 years ago
Bugzilla Link PR27460
Status NEW
Importance P normal
Reported by Quentin Colombet (quentin.colombet@gmail.com)
Reported on 2016-04-21 16:55:21 -0700
Last modified on 2021-11-02 07:58:53 -0700
Version trunk
Hardware PC All
CC andrew.savonichev@gmail.com, justin.lebar@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, matze@braunis.de, tra@google.com
Fixed by commit(s)
Attachments
Blocks PR32146
Blocked by
See also
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/NVPTX/MachineSink-call.ll
    LLVM :: CodeGen/NVPTX/MachineSink-convergent.ll
    LLVM :: CodeGen/NVPTX/access-non-generic.ll
    LLVM :: CodeGen/NVPTX/addrspacecast.ll
    LLVM :: CodeGen/NVPTX/arg-lowering.ll
    LLVM :: CodeGen/NVPTX/arithmetic-fp-sm20.ll
    LLVM :: CodeGen/NVPTX/arithmetic-int.ll
    LLVM :: CodeGen/NVPTX/atomics.ll
    LLVM :: CodeGen/NVPTX/bfe.ll
    LLVM :: CodeGen/NVPTX/branch-fold.ll
    LLVM :: CodeGen/NVPTX/bug17709.ll
    LLVM :: CodeGen/NVPTX/bug26185.ll
    LLVM :: CodeGen/NVPTX/call-with-alloca-buffer.ll
    LLVM :: CodeGen/NVPTX/combine-min-max.ll
    LLVM :: CodeGen/NVPTX/compare-int.ll
    LLVM :: CodeGen/NVPTX/convert-fp.ll
    LLVM :: CodeGen/NVPTX/convert-int-sm20.ll
    LLVM :: CodeGen/NVPTX/ctlz.ll
    LLVM :: CodeGen/NVPTX/ctpop.ll
    LLVM :: CodeGen/NVPTX/cttz.ll
    LLVM :: CodeGen/NVPTX/disable-opt.ll
    LLVM :: CodeGen/NVPTX/div-ri.ll
    LLVM :: CodeGen/NVPTX/envreg.ll
    LLVM :: CodeGen/NVPTX/fast-math.ll
    LLVM :: CodeGen/NVPTX/fma-assoc.ll
    LLVM :: CodeGen/NVPTX/fma-disable.ll
    LLVM :: CodeGen/NVPTX/fma.ll
    LLVM :: CodeGen/NVPTX/fp-contract.ll
    LLVM :: CodeGen/NVPTX/fp-literals.ll
    LLVM :: CodeGen/NVPTX/i1-int-to-fp.ll
    LLVM :: CodeGen/NVPTX/i8-param.ll
    LLVM :: CodeGen/NVPTX/imad.ll
    LLVM :: CodeGen/NVPTX/implicit-def.ll
    LLVM :: CodeGen/NVPTX/inline-asm.ll
    LLVM :: CodeGen/NVPTX/intrinsic-old.ll
    LLVM :: CodeGen/NVPTX/intrinsics.ll
    LLVM :: CodeGen/NVPTX/isspacep.ll
    LLVM :: CodeGen/NVPTX/ld-addrspace.ll
    LLVM :: CodeGen/NVPTX/ld-generic.ll
    LLVM :: CodeGen/NVPTX/ldu-i8.ll
    LLVM :: CodeGen/NVPTX/ldu-ldg.ll
    LLVM :: CodeGen/NVPTX/ldu-reg-plus-offset.ll
    LLVM :: CodeGen/NVPTX/load-with-non-coherent-cache.ll
    LLVM :: CodeGen/NVPTX/local-stack-frame.ll
    LLVM :: CodeGen/NVPTX/lower-aggr-copies.ll
    LLVM :: CodeGen/NVPTX/lower-alloca.ll
    LLVM :: CodeGen/NVPTX/machine-sink.ll
    LLVM :: CodeGen/NVPTX/misaligned-vector-ldst.ll
    LLVM :: CodeGen/NVPTX/mulwide.ll
    LLVM :: CodeGen/NVPTX/pr16278.ll
    LLVM :: CodeGen/NVPTX/refl1.ll
    LLVM :: CodeGen/NVPTX/reg-copy.ll
    LLVM :: CodeGen/NVPTX/rotate.ll
    LLVM :: CodeGen/NVPTX/rsqrt.ll
    LLVM :: CodeGen/NVPTX/sext-params.ll
    LLVM :: CodeGen/NVPTX/simple-call.ll
    LLVM :: CodeGen/NVPTX/symbol-naming.ll
    LLVM :: CodeGen/NVPTX/texsurf-queries.ll
    LLVM :: CodeGen/NVPTX/vec-param-load.ll
    LLVM :: CodeGen/NVPTX/vector-args.ll
    LLVM :: CodeGen/NVPTX/vector-call.ll
    LLVM :: CodeGen/NVPTX/vector-return.ll
    LLVM :: CodeGen/NVPTX/weak-global.ll

This may be latent bugs.
Quuxplusone commented 8 years ago
A few more that I missed:
    LLVM :: Transforms/NaryReassociate/NVPTX/nary-slsr.ll
    LLVM :: Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll
    LLVM :: Transforms/StraightLineStrengthReduce/NVPTX/reassociate-geps-and-slsr.ll
    LLVM :: Transforms/StraightLineStrengthReduce/NVPTX/speculative-slsr.ll
Quuxplusone commented 7 years ago

CC'ing some NVPTX guys

Quuxplusone commented 7 years ago

Patches welcome, although Art and I won't have much time to review them for four or five months.

When I last looked at these, most seemed to be benign (i.e. we needed to fix something in the backend, but it wasn't actively causing problems), but I'm sure you'd find an actual bug or two.

Quuxplusone commented 7 years ago
https://reviews.llvm.org/D33147 fixes the StoreRetVal 'MayLoad' errors, with
this patch the remaining errors are:

LLVM :: CodeGen/NVPTX/access-non-generic.ll
LLVM :: CodeGen/NVPTX/aggregate-return.ll
LLVM :: CodeGen/NVPTX/branch-fold.ll
LLVM :: CodeGen/NVPTX/bug17709.ll
LLVM :: CodeGen/NVPTX/bug26185-2.ll
LLVM :: CodeGen/NVPTX/bug26185.ll
LLVM :: CodeGen/NVPTX/call-with-alloca-buffer.ll
LLVM :: CodeGen/NVPTX/disable-opt.ll
LLVM :: CodeGen/NVPTX/envreg.ll
LLVM :: CodeGen/NVPTX/f16-instructions.ll
LLVM :: CodeGen/NVPTX/f16x2-instructions.ll
LLVM :: CodeGen/NVPTX/fma.ll
LLVM :: CodeGen/NVPTX/i8-param.ll
LLVM :: CodeGen/NVPTX/ldg-invariant.ll
LLVM :: CodeGen/NVPTX/ldu-i8.ll
LLVM :: CodeGen/NVPTX/ldu-ldg.ll
LLVM :: CodeGen/NVPTX/ldu-reg-plus-offset.ll
LLVM :: CodeGen/NVPTX/load-with-non-coherent-cache.ll
LLVM :: CodeGen/NVPTX/local-stack-frame.ll
LLVM :: CodeGen/NVPTX/lower-alloca.ll
LLVM :: CodeGen/NVPTX/param-align.ll
LLVM :: CodeGen/NVPTX/param-load-store.ll
LLVM :: CodeGen/NVPTX/refl1.ll
LLVM :: CodeGen/NVPTX/reg-copy.ll
LLVM :: CodeGen/NVPTX/reg-types.ll
LLVM :: CodeGen/NVPTX/simple-call.ll
LLVM :: CodeGen/NVPTX/symbol-naming.ll
LLVM :: CodeGen/NVPTX/vector-call.ll
LLVM :: CodeGen/NVPTX/zeroext-32bit.ll
Quuxplusone commented 7 years ago
These are still failing too:

LLVM :: Transforms/NaryReassociate/NVPTX/nary-slsr.ll
LLVM :: Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep-and-gvn.ll
LLVM :: Transforms/StraightLineStrengthReduce/NVPTX/reassociate-geps-and-slsr.ll
LLVM :: Transforms/StraightLineStrengthReduce/NVPTX/speculative-slsr.ll
Quuxplusone commented 7 years ago
rL303082 fixes the StoreParam/LoadParam errors

Failing Tests (16):
    LLVM :: CodeGen/NVPTX/branch-fold.ll
    LLVM :: CodeGen/NVPTX/bug26185-2.ll
    LLVM :: CodeGen/NVPTX/bug26185.ll
    LLVM :: CodeGen/NVPTX/call-with-alloca-buffer.ll
    LLVM :: CodeGen/NVPTX/disable-opt.ll
    LLVM :: CodeGen/NVPTX/envreg.ll
    LLVM :: CodeGen/NVPTX/ldg-invariant.ll
    LLVM :: CodeGen/NVPTX/ldu-i8.ll
    LLVM :: CodeGen/NVPTX/ldu-ldg.ll
    LLVM :: CodeGen/NVPTX/ldu-reg-plus-offset.ll
    LLVM :: CodeGen/NVPTX/load-with-non-coherent-cache.ll
    LLVM :: CodeGen/NVPTX/local-stack-frame.ll
    LLVM :: CodeGen/NVPTX/lower-alloca.ll
    LLVM :: CodeGen/NVPTX/param-align.ll
    LLVM :: CodeGen/NVPTX/reg-copy.ll
    LLVM :: CodeGen/NVPTX/reg-types.ll

(and this time the Transforms tests are fixed!).
Quuxplusone commented 7 years ago

r304320 enabled the machine verifier by default with EXPENSIVE_CHECKS. NVPTX 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.

Quuxplusone commented 3 years ago
With the following patches I get a clean check-llvm for NVPTX:

Merged:
D110146 [NVPTX] Add VRFrame and VRFrameLocal to integer register classes

In review:
D112232 [NVPTX] Add imm variants for surface and texture instructions
D112466 [NVPTX] Drop memory references of LDG/LDU
D113001 [NVPTX] Copy machine operand flags in TII::insertBranch
D113006 [NVPTX] Add MoveParam instruction for TargetExternalSymbol operand
D113008 [NVPTX] Mark special registers as reserved