llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

tests require FileCheck's deprecated overlapping CHECK-DAG

Open jdenny-ornl opened this issue 8 years ago • 15 comments

Bugzilla Link 37532
Version trunk
OS Linux
CC @hahnjo,@pogo59

Extended Description

The following patch changes FileCheck's CHECK-DAG directive not to permit matches to overlap the matches of any preceding consecutive CHECK-DAG directives:

https://reviews.llvm.org/D47106

However, that change breaks many existing tests, which are tracked by this bugzilla issue.

That patch also implements the FileCheck command-line option -allow-deprecated-dag-overlap, which reverts CHECK-DAG to the old overlapping behavior. Before committing the above patch, we will add that option to the broken tests. After committing, we will gradually adjust those tests for the new behavior.

The list of unexpected test failures I'm seeing currently is below. You'll notice I haven't yet cloned every LLVM repo, so there might be other unexpected failures elsewhere.

Setup

The repos and base commits I'm testing:

$ find . -name .git -exec sh -c 'cd {}/.. && echo rgit svn find-rev @ git rev-parse @ {}' ; r332809 06b38392dd60537b5d5732362f0ea8ec8dcea3d5 ./.git r332775 2dc250081581f8dca5807819fbf4fed217f87ab5 ./tools/polly/.git r332789 8daca416e4060dc49314744d23766e267d3dd919 ./tools/lld/.git r332806 6b2fbf833d28a7e73f5728593cf6f9ba95cc2c24 ./tools/clang/.git r332792 da054b1bc17dd4b6607aa9c8d7e66ff4d77d1308 ./projects/compiler-rt/.git r332797 262632877b2d25065267b8641c3a083204636905 ./projects/libcxx/.git r332495 abedd0661b48ab4541cd7fbbf68de130798c4b16 ./projects/openmp/.git r332660 b9d870b66613fe18698e504ad78f3c7a98cb4a32 ./projects/test-suite/.git r332767 e0330b61d74b898ee64922d0a3d50c3562f6ddb1 ./projects/libcxxabi/.git

llvm.git also includes the non-overlapping CHECK-DAG patch as of the following version:

https://reviews.llvm.org/D47106?id=147664

polly.git also includes the following patch to fix a break in the build:

diff --git a/lib/Support/RegisterPasses.cpp b/lib/Support/RegisterPasses.cpp index 2ce0f63e..975ec574 100644 --- a/lib/Support/RegisterPasses.cpp +++ b/lib/Support/RegisterPasses.cpp @@ -706,7 +706,7 @@ void RegisterPollyPasses(PassBuilder &PB) { } // namespace polly

// Plugin Entrypoint: -extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK LLVM_PLUGIN_EXPORT +extern "C" ::llvm::PassPluginLibraryInfo LLVM_ATTRIBUTE_WEAK llvmGetPassPluginInfo() { return {LLVM_PLUGIN_API_VERSION, "Polly", LLVM_VERSION_STRING, polly::RegisterPollyPasses};

Results

ninja check-all gives the following summary of unexpected failures, of which 101 are new. I have added asterisks in front of all failures that are also present without the CHECK-DAG patch.

Failing Tests (110): Clang :: CodeGen/dso-local-executable.c Clang :: CodeGen/may-alias.c Clang :: CodeGenCUDA/convergent.cu Clang :: CodeGenCUDA/device-stub.cu Clang :: CodeGenCXX/debug-info-line-if.cpp Clang :: CodeGenCXX/dllexport.cpp Clang :: CodeGenCXX/inline-hint.cpp Clang :: CodeGenCXX/linetable-eh.cpp Clang :: CodeGenCXX/mangle-ms-cxx14.cpp Clang :: CodeGenCXX/regcall.cpp Clang :: CodeGenCXX/runtime-dllstorage.cpp Clang :: CodeGenObjC/dllstorage.m Clang :: Driver/cuda-no-pgo-or-coverage.cu Clang :: OpenMP/for_codegen.cpp Clang :: OpenMP/for_reduction_codegen.cpp Clang :: OpenMP/for_reduction_codegen_UDR.cpp Clang :: OpenMP/sections_reduction_codegen.cpp Clang :: OpenMP/target_map_codegen.cpp Clang :: OpenMP/target_parallel_codegen.cpp Clang :: OpenMP/target_parallel_for_codegen.cpp Clang :: OpenMP/target_parallel_for_simd_codegen.cpp Clang :: OpenMP/target_simd_codegen.cpp Clang :: OpenMP/target_teams_codegen.cpp Clang :: OpenMP/target_teams_distribute_codegen.cpp Clang :: OpenMP/target_teams_distribute_firstprivate_codegen.cpp Clang :: OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp Clang :: OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp Clang :: OpenMP/target_teams_distribute_private_codegen.cpp Clang :: OpenMP/target_teams_distribute_simd_codegen.cpp Clang :: OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp Clang :: OpenMP/target_teams_distribute_simd_private_codegen.cpp Clang :: OpenMP/teams_distribute_firstprivate_codegen.cpp Clang :: OpenMP/teams_distribute_parallel_for_private_codegen.cpp Clang :: OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp Clang :: OpenMP/teams_distribute_private_codegen.cpp Clang :: OpenMP/teams_distribute_simd_firstprivate_codegen.cpp Clang :: OpenMP/teams_distribute_simd_private_codegen.cpp Clang :: Profile/c-captured.c Clang :: Profile/c-general.c Clang :: Profile/cxx-lambda.cpp Clang :: SemaCXX/pragma-optimize.cpp LLVM :: Bitcode/thinlto-function-summary-originalnames.ll LLVM :: Bitcode/thinlto-summary-local-5.0.ll LLVM :: Bitcode/upgrade-pointer-address-space.ll LLVM :: CodeGen/AArch64/fp16-v8-instructions.ll LLVM :: CodeGen/AArch64/swifterror.ll LLVM :: CodeGen/AMDGPU/callee-special-input-sgprs.ll LLVM :: CodeGen/AMDGPU/cvt_f32_ubyte.ll LLVM :: CodeGen/AMDGPU/fceil64.ll LLVM :: CodeGen/AMDGPU/fcmp.f16.ll LLVM :: CodeGen/AMDGPU/fp_to_sint.ll LLVM :: CodeGen/AMDGPU/fp_to_uint.ll LLVM :: CodeGen/AMDGPU/fpext.f16.ll LLVM :: CodeGen/AMDGPU/half.ll LLVM :: CodeGen/AMDGPU/llvm.amdgcn.interp.ll LLVM :: CodeGen/AMDGPU/llvm.exp2.ll LLVM :: CodeGen/AMDGPU/llvm.log.ll LLVM :: CodeGen/AMDGPU/llvm.log10.ll LLVM :: CodeGen/AMDGPU/llvm.log2.ll LLVM :: CodeGen/AMDGPU/load-constant-i32.ll LLVM :: CodeGen/AMDGPU/load-constant-i8.ll LLVM :: CodeGen/AMDGPU/load-global-i16.ll LLVM :: CodeGen/AMDGPU/load-global-i32.ll LLVM :: CodeGen/AMDGPU/load-global-i8.ll LLVM :: CodeGen/AMDGPU/load-local-i16.ll LLVM :: CodeGen/AMDGPU/load-local-i8.ll LLVM :: CodeGen/AMDGPU/mul.ll LLVM :: CodeGen/AMDGPU/private-element-size.ll LLVM :: CodeGen/AMDGPU/setcc.ll LLVM :: CodeGen/AMDGPU/shl.ll LLVM :: CodeGen/AMDGPU/shl_add_constant.ll LLVM :: CodeGen/AMDGPU/sign_extend.ll LLVM :: CodeGen/AMDGPU/sra.ll LLVM :: CodeGen/AMDGPU/srl.ll LLVM :: CodeGen/AMDGPU/store-hi16.ll LLVM :: CodeGen/AMDGPU/store-v3i64.ll LLVM :: CodeGen/AMDGPU/udivrem.ll LLVM :: CodeGen/AMDGPU/uint_to_fp.ll LLVM :: CodeGen/AMDGPU/v_mac_f16.ll LLVM :: CodeGen/ARM/fp16-promote.ll LLVM :: CodeGen/Mips/bswap.ll LLVM :: CodeGen/Mips/cconv/arguments-hard-float-varargs.ll LLVM :: CodeGen/Mips/cconv/arguments-varargs.ll LLVM :: CodeGen/Mips/cconv/callee-saved.ll LLVM :: CodeGen/Mips/cconv/return-struct.ll LLVM :: CodeGen/Mips/madd-msub.ll LLVM :: CodeGen/Mips/msa/basic_operations.ll LLVM :: CodeGen/Mips/no-odd-spreg.ll LLVM :: CodeGen/NVPTX/f16x2-instructions.ll LLVM :: CodeGen/NVPTX/intrinsic-old.ll LLVM :: CodeGen/NVPTX/param-load-store.ll LLVM :: CodeGen/PowerPC/build-vector-tests.ll LLVM :: CodeGen/PowerPC/memcpy-vec.ll LLVM :: CodeGen/PowerPC/swaps-le-1.ll LLVM :: CodeGen/SystemZ/backchain.ll LLVM :: CodeGen/SystemZ/cond-load-03.ll LLVM :: CodeGen/X86/x86-cmov-converter.ll LLVM :: Instrumentation/MemorySanitizer/msan_basic.ll LLVM :: ThinLTO/X86/alias_import.ll

  • LeakSanitizer-AddressSanitizer-x86_64 :: TestCases/Linux/use_tls_dynamic.cc
  • LeakSanitizer-Standalone-x86_64 :: TestCases/Linux/use_tls_dynamic.cc
  • MemorySanitizer-X86_64 :: dtls_test.c
  • MemorySanitizer-lld-X86_64 :: dtls_test.c Profile-x86_64 :: instrprof-visibility.cpp
  • SanitizerCommon-asan-x86_64-Linux :: Linux/name_to_handle_at.cc
  • SanitizerCommon-lsan-x86_64-Linux :: Linux/name_to_handle_at.cc
  • SanitizerCommon-msan-x86_64-Linux :: Linux/name_to_handle_at.cc
  • SanitizerCommon-tsan-x86_64-Linux :: Linux/name_to_handle_at.cc
  • SanitizerCommon-ubsan-x86_64-Linux :: Linux/name_to_handle_at.cc libomp :: ompt/parallel/not_enough_threads.c

Expected Passes : 48982 Expected Failures : 247 Unsupported Tests : 1745 Unexpected Failures: 110

jdenny-ornl avatar May 19 '18 18:05 jdenny-ornl

I'm going to start putting some (gradual) effort into eliminating -allow-deprecated-dag-overlap.

First, let's see what's change since I last posted here:

  • 2 tests have removed it:

    SN C++ IA64 ABI Tests::c++11s.cpp (r336830) lldb :: SymbolFile/DWARF/find-basic-function.cpp (r337188)

  • 1 test has added it:

    LLVM :: CodeGen/WebAssembly/exception.ll (r336870)

  • That leaves 111 total tests, not including FileCheck's own tests, which we'll change last.

To get oriented, I'm pasting the full list here once more, and hopefully we'll just be removing items in the future. Now that grep produces the list instead of lit output, let's stick with file names:

clang/test/CodeGen/dso-local-executable.c clang/test/CodeGen/may-alias.c clang/test/CodeGenCUDA/convergent.cu clang/test/CodeGenCUDA/device-stub.cu clang/test/CodeGenCXX/debug-info-line-if.cpp clang/test/CodeGenCXX/dllexport.cpp clang/test/CodeGenCXX/inline-hint.cpp clang/test/CodeGenCXX/linetable-eh.cpp clang/test/CodeGenCXX/mangle-ms-cxx14.cpp clang/test/CodeGenCXX/microsoft-abi-member-pointers.cpp clang/test/CodeGenCXX/regcall.cpp clang/test/CodeGenCXX/runtime-dllstorage.cpp clang/test/CodeGenCXX/vtable-available-externally.cpp clang/test/CodeGenObjC/dllstorage.m clang/test/Driver/cuda-no-pgo-or-coverage.cu clang/test/OpenMP/for_codegen.cpp clang/test/OpenMP/for_reduction_codegen.cpp clang/test/OpenMP/for_reduction_codegen_UDR.cpp clang/test/OpenMP/sections_reduction_codegen.cpp clang/test/OpenMP/target_map_codegen.cpp clang/test/OpenMP/target_parallel_codegen.cpp clang/test/OpenMP/target_parallel_for_codegen.cpp clang/test/OpenMP/target_parallel_for_simd_codegen.cpp clang/test/OpenMP/target_simd_codegen.cpp clang/test/OpenMP/target_teams_codegen.cpp clang/test/OpenMP/target_teams_distribute_codegen.cpp clang/test/OpenMP/target_teams_distribute_firstprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_parallel_for_simd_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_private_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_firstprivate_codegen.cpp clang/test/OpenMP/target_teams_distribute_simd_private_codegen.cpp clang/test/OpenMP/teams_distribute_firstprivate_codegen.cpp clang/test/OpenMP/teams_distribute_parallel_for_private_codegen.cpp clang/test/OpenMP/teams_distribute_parallel_for_simd_private_codegen.cpp clang/test/OpenMP/teams_distribute_private_codegen.cpp clang/test/OpenMP/teams_distribute_simd_firstprivate_codegen.cpp clang/test/OpenMP/teams_distribute_simd_private_codegen.cpp clang/test/Profile/c-captured.c clang/test/Profile/c-general.c clang/test/Profile/cxx-lambda.cpp clang/test/SemaCXX/pragma-optimize.cpp compiler-rt/test/fuzzer/dump_coverage.test compiler-rt/test/profile/instrprof-visibility.cpp llvm/test/Bitcode/thinlto-function-summary-originalnames.ll llvm/test/Bitcode/thinlto-summary-local-5.0.ll llvm/test/Bitcode/upgrade-pointer-address-space.ll llvm/test/CodeGen/AArch64/fp16-v8-instructions.ll llvm/test/CodeGen/AArch64/swifterror.ll llvm/test/CodeGen/AMDGPU/ashr.v2i16.ll llvm/test/CodeGen/AMDGPU/bfi_int.ll llvm/test/CodeGen/AMDGPU/callee-special-input-sgprs.ll llvm/test/CodeGen/AMDGPU/copy-illegal-type.ll llvm/test/CodeGen/AMDGPU/cvt_f32_ubyte.ll llvm/test/CodeGen/AMDGPU/extract_vector_elt-i8.ll llvm/test/CodeGen/AMDGPU/fceil64.ll llvm/test/CodeGen/AMDGPU/fcmp.f16.ll llvm/test/CodeGen/AMDGPU/fp_to_sint.ll llvm/test/CodeGen/AMDGPU/fp_to_uint.ll llvm/test/CodeGen/AMDGPU/fpext.f16.ll llvm/test/CodeGen/AMDGPU/half.ll llvm/test/CodeGen/AMDGPU/kernel-args.ll llvm/test/CodeGen/AMDGPU/llvm.amdgcn.interp.ll llvm/test/CodeGen/AMDGPU/llvm.exp2.ll llvm/test/CodeGen/AMDGPU/llvm.log.ll llvm/test/CodeGen/AMDGPU/llvm.log10.ll llvm/test/CodeGen/AMDGPU/llvm.log2.ll llvm/test/CodeGen/AMDGPU/load-constant-i32.ll llvm/test/CodeGen/AMDGPU/load-constant-i8.ll llvm/test/CodeGen/AMDGPU/load-global-i16.ll llvm/test/CodeGen/AMDGPU/load-global-i32.ll llvm/test/CodeGen/AMDGPU/load-global-i8.ll llvm/test/CodeGen/AMDGPU/load-local-i16.ll llvm/test/CodeGen/AMDGPU/load-local-i8.ll llvm/test/CodeGen/AMDGPU/mul.ll llvm/test/CodeGen/AMDGPU/private-element-size.ll llvm/test/CodeGen/AMDGPU/setcc.ll llvm/test/CodeGen/AMDGPU/shl.ll llvm/test/CodeGen/AMDGPU/shl_add_constant.ll llvm/test/CodeGen/AMDGPU/sign_extend.ll llvm/test/CodeGen/AMDGPU/sra.ll llvm/test/CodeGen/AMDGPU/srl.ll llvm/test/CodeGen/AMDGPU/store-hi16.ll llvm/test/CodeGen/AMDGPU/store-v3i64.ll llvm/test/CodeGen/AMDGPU/udivrem.ll llvm/test/CodeGen/AMDGPU/uint_to_fp.ll llvm/test/CodeGen/AMDGPU/v_mac_f16.ll llvm/test/CodeGen/ARM/fp16-promote.ll llvm/test/CodeGen/Mips/bswap.ll llvm/test/CodeGen/Mips/cconv/arguments-hard-float-varargs.ll llvm/test/CodeGen/Mips/cconv/arguments-varargs.ll llvm/test/CodeGen/Mips/cconv/callee-saved.ll llvm/test/CodeGen/Mips/cconv/return-struct.ll llvm/test/CodeGen/Mips/madd-msub.ll llvm/test/CodeGen/Mips/msa/basic_operations.ll llvm/test/CodeGen/Mips/no-odd-spreg.ll llvm/test/CodeGen/NVPTX/f16x2-instructions.ll llvm/test/CodeGen/NVPTX/intrinsic-old.ll llvm/test/CodeGen/NVPTX/param-load-store.ll llvm/test/CodeGen/PowerPC/build-vector-tests.ll llvm/test/CodeGen/PowerPC/machine-combiner.ll llvm/test/CodeGen/PowerPC/memcpy-vec.ll llvm/test/CodeGen/PowerPC/swaps-le-1.ll llvm/test/CodeGen/SystemZ/backchain.ll llvm/test/CodeGen/SystemZ/cond-load-03.ll llvm/test/CodeGen/WebAssembly/exception.ll llvm/test/CodeGen/X86/x86-cmov-converter.ll llvm/test/Instrumentation/MemorySanitizer/msan_basic.ll llvm/test/ThinLTO/X86/alias_import.ll test-suite/ABI-Testsuite/test/mangling/test.xpp

I think I'll start submitting patches for the tests I investigated here:

http://lists.llvm.org/pipermail/llvm-dev/2018-May/123258.html

Please post in this bugzilla if you plan to work on any of these so that we don't duplicate effort.

jdenny-ornl avatar Sep 28 '18 20:09 jdenny-ornl

BTW, as we agreed, I've been committing patches to add -allow-deprecated-dag-overlap to failing tests to make them pass.

Exactly right. No need for pre-commit review on that kind of stuff.

pogo59 avatar Jul 12 '18 14:07 pogo59

1 more found by a buildbot:

libFuzzer :: dump_coverage.test

I think I missed this one when running locally because so many libFuzzer tests have been failing for me lately with or without the CHECK-DAG work.

BTW, as we agreed, I've been committing patches to add -allow-deprecated-dag-overlap to failing tests to make them pass.

jdenny-ornl avatar Jul 11 '18 22:07 jdenny-ornl

2 more, found via buildbot as I don't normally run test-suite:

SN C++ IA64 ABI Tests::c++11s.cpp
SN C++ IA64 ABI Tests::test.cpp

Hm. That's the ABI test suite that Sony contributed, if I'm not mistaken. I'll let the maintainer know.

pogo59 avatar Jul 11 '18 21:07 pogo59

2 more, found via buildbot as I don't normally run test-suite:

SN C++ IA64 ABI Tests::c++11s.cpp
SN C++ IA64 ABI Tests::test.cpp

jdenny-ornl avatar Jul 11 '18 21:07 jdenny-ornl

2 more:

LLVM :: CodeGen/PowerPC/machine-combiner.ll
lldb :: SymbolFile/DWARF/find-basic-function.cpp

Hopefully I'll get things committed today so that this list doesn't keep growing.

jdenny-ornl avatar Jul 11 '18 15:07 jdenny-ornl

5 more to add:

LLVM :: CodeGen/AMDGPU/ashr.v2i16.ll
LLVM :: CodeGen/AMDGPU/bfi_int.ll
LLVM :: CodeGen/AMDGPU/copy-illegal-type.ll
LLVM :: CodeGen/AMDGPU/extract_vector_elt-i8.ll
LLVM :: CodeGen/AMDGPU/kernel-args.ll

jdenny-ornl avatar Jul 02 '18 19:07 jdenny-ornl

Two more to add to the list:

Clang :: CodeGenCXX/microsoft-abi-member-pointers.cpp
Clang :: CodeGenCXX/vtable-available-externally.cpp

jdenny-ornl avatar Jun 18 '18 21:06 jdenny-ornl

For that test, see the S3 heading at:

http://lists.llvm.org/pipermail/llvm-dev/2018-May/123258.html

I think this one is easy to fix.

And we can certainly wait a bit to commit.

Thanks.

You are absolutely right, thanks for pointing me to your analysis. I've taken the time to properly reformat the test which we are trying to do for all tests that we touch and submitted https://reviews.llvm.org/D47119.

Just trying to keep track: That patch has landed, so the following can be removed from our list of broken tests:

libomp :: ompt/parallel/not_enough_threads.c

jdenny-ornl avatar Jun 01 '18 14:06 jdenny-ornl

For that test, see the S3 heading at:

http://lists.llvm.org/pipermail/llvm-dev/2018-May/123258.html

I think this one is easy to fix.

And we can certainly wait a bit to commit.

Thanks.

You are absolutely right, thanks for pointing me to your analysis. I've taken the time to properly reformat the test which we are trying to do for all tests that we touch and submitted https://reviews.llvm.org/D47119.

hahnjo avatar May 20 '18 15:05 hahnjo

Adding -allow-deprecated-dag-overlap is problematic for projects that allow building and testing with older versions of LLVM/Clang. openmp certainly does, I'm not sure if all other repositories are version-locked... If anything I'd like to request some time to adjust the OMPT test before committing the mentioned patch.

Thanks for pointing out this requirement. Perhaps such test suites can have a lit substitution that expands to this flag or the empty string based on the FileCheck version. Would that suffice?

Good idea, that would probably work. It's a bit tedious though because you need to add extra code to check the version. If you are not bound to committing this in the next few days, I think it's probably easier to fix that single test. I'm a bit surprised anyway that this one is different from all the others, so I plan to have a look today or tomorrow. I'll keep you posted ;-)

For that test, see the S3 heading at:

http://lists.llvm.org/pipermail/llvm-dev/2018-May/123258.html

I think this one is easy to fix.

And we can certainly wait a bit to commit.

Thanks.

jdenny-ornl avatar May 20 '18 14:05 jdenny-ornl

Adding -allow-deprecated-dag-overlap is problematic for projects that allow building and testing with older versions of LLVM/Clang. openmp certainly does, I'm not sure if all other repositories are version-locked... If anything I'd like to request some time to adjust the OMPT test before committing the mentioned patch.

Thanks for pointing out this requirement. Perhaps such test suites can have a lit substitution that expands to this flag or the empty string based on the FileCheck version. Would that suffice?

Good idea, that would probably work. It's a bit tedious though because you need to add extra code to check the version. If you are not bound to committing this in the next few days, I think it's probably easier to fix that single test. I'm a bit surprised anyway that this one is different from all the others, so I plan to have a look today or tomorrow. I'll keep you posted ;-)

hahnjo avatar May 20 '18 14:05 hahnjo

Adding -allow-deprecated-dag-overlap is problematic for projects that allow building and testing with older versions of LLVM/Clang. openmp certainly does, I'm not sure if all other repositories are version-locked... If anything I'd like to request some time to adjust the OMPT test before committing the mentioned patch.

Thanks for pointing out this requirement. Perhaps such test suites can have a lit substitution that expands to this flag or the empty string based on the FileCheck version. Would that suffice?

jdenny-ornl avatar May 20 '18 13:05 jdenny-ornl

Adding -allow-deprecated-dag-overlap is problematic for projects that allow building and testing with older versions of LLVM/Clang. openmp certainly does, I'm not sure if all other repositories are version-locked... If anything I'd like to request some time to adjust the OMPT test before committing the mentioned patch.

hahnjo avatar May 20 '18 08:05 hahnjo

assigned to @jdenny-ornl

jdenny-ornl avatar May 19 '18 18:05 jdenny-ornl