libomp regressions in 3.8 branch

Is anyone else seeing these regressions in the libomp test suite in
the 3.8 branch? On x86_64-apple-darwin15, I am seeing a number of new
regressions...

FAIL: libomp :: parallel/omp_parallel_copyin.c (12 of 67)
******************** TEST 'libomp :: parallel/omp_parallel_copyin.c'
FAILED ********************
Script:

The OpenMP3.1_Validation test suite is also showing 14 new failures in
3.8 branch. These seem to all be of the form...

Testing for "omp_for_firstprivate":
Generating sources .............. success
Compiling soures ............0 libLLVMSupport.dylib
0x000000010360a38b llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 43
1 libLLVMSupport.dylib 0x0000000103609766
llvm::sys::RunSignalHandlers() + 70
2 libLLVMSupport.dylib 0x000000010360ab37 SignalHandler(int) + 519
3 libsystem_platform.dylib 0x00007fff8e9b052a _sigtramp + 26
4 libsystem_platform.dylib 0x0000000000010001 _sigtramp + 1902508785
5 libLLVMCodeGen.dylib 0x0000000102dab106 (anonymous
namespace)::RegisterCoalescer::joinCopy(llvm::MachineInstr*, bool&) +
934
6 libLLVMCodeGen.dylib 0x0000000102daa293 (anonymous
namespace)::RegisterCoalescer::runOnMachineFunction(llvm::MachineFunction&)
+ 3107
7 libLLVMCodeGen.dylib 0x0000000102d0f453
llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 99
8 libLLVMCore.dylib 0x000000010301b162
llvm::FPPassManager::runOnFunction(llvm::Function&) + 514
9 libLLVMCore.dylib 0x000000010301b35b
llvm::FPPassManager::runOnModule(llvm::Module&) + 43
10 libLLVMCore.dylib 0x000000010301b7f4
llvm::legacy::PassManagerImpl::run(llvm::Module&) + 916
11 libclangCodeGen.dylib 0x00000001039347b5
clang::EmitBackendOutput(clang::DiagnosticsEngine&,
clang::CodeGenOptions const&, clang::TargetOptions const&,
clang::LangOptions const&, llvm::StringRef, llvm::Module*,
clang::BackendAction, llvm::raw_pwrite_stream*) + 8901
12 libclangCodeGen.dylib 0x0000000103a975e1
clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) +
497
13 libclangParse.dylib 0x0000000104626135
clang::ParseAST(clang::Sema&, bool, bool) + 581
14 libclangFrontend.dylib 0x0000000103d746e0
clang::FrontendAction::Execute() + 64
15 libclangFrontend.dylib 0x0000000103d3cf98
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 952
16 libclangFrontendTool.dylib 0x0000000103dff89e
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4254
17 clang-3.8 0x0000000101f56911
cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1217
18 clang-3.8 0x0000000101f55a8f main + 11935
19 libdyld.dylib 0x00007fff9ef1c5ad start + 1
Stack dump:
0. Program arguments: /sw/opt/llvm-3.8/bin/clang-3.8 -cc1 -triple
x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage
-Werror=deprecated-objc-isa-usage -emit-obj -disable-free
-disable-llvm-verifier -main-file-name test_omp_for_firstprivate.c
-mrelocation-model pic -pic-level 2 -mthread-model posix
-mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2
-target-linker-version 253.9 -dwarf-column-info -debugger-tuning=lldb
-resource-dir /sw/opt/llvm-3.8/bin/../lib/clang/3.8.0 -O3
-fdebug-compilation-dir /Users/howarth/OpenMP3.1_Validation
-ferror-limit 19 -fmessage-length 174 -fopenmp -stack-protector 1
-fblocks -fobjc-runtime=macosx-10.11.0
-fencode-extended-block-signature -fmax-type-align=16
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops
-vectorize-slp -o
/var/folders/mv/99_6mc294p7fymnm3dw_yp_h0000gn/T/test_omp_for_firstprivate-60f0a0.o
-x c bin/c/test_omp_for_firstprivate.c
1. <eof> parser at end of file
2. Code generation
3. Running pass 'Function Pass Manager' on module
'bin/c/test_omp_for_firstprivate.c'.
4. Running pass 'Simple Register Coalescing' on function '@_ZTW4sum1'
clang-3.8: error: unable to execute command: Segmentation fault: 11
clang-3.8: error: clang frontend command failed due to signal (use -v
to see invocation)
clang version 3.8.0 (branches/release_38)
Target: x86_64-apple-darwin15.4.0
Thread model: posix
InstalledDir: /sw/bin
clang-3.8: note: diagnostic msg: PLEASE submit a bug report to
http://llvm.org/bugs/ and include the crash backtrace, preprocessed
source, and associated run script.
clang-3.8: note: diagnostic msg:

Hi Jack,

Thanks for testing! Please file a bug report including the crash-reporter-generated *.c/*.sh files.

-Hal

Caused by...

Author: mren
New Revision: 257428

URL: http://llvm.org/viewvc/llvm-project?rev=257428&view=rev
Log:
CXX_FAST_TLS calling convention: performance improvement for x86-64.

This is the same change on x86-64 as r255821 on AArch64.
rdar://9001553

Modified:
    llvm/trunk/lib/Target/X86/X86CallingConv.td
    llvm/trunk/lib/Target/X86/X86FastISel.cpp
    llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
    llvm/trunk/lib/Target/X86/X86ISelLowering.h
    llvm/trunk/lib/Target/X86/X86MachineFunctionInfo.h
    llvm/trunk/lib/Target/X86/X86RegisterInfo.cpp
    llvm/trunk/lib/Target/X86/X86RegisterInfo.h
    llvm/trunk/test/CodeGen/X86/cxx_tlscc64.ll

as r257427 is fine but r257428 shows the regression. Someone should
also check the libomp test suite in openmp for the AArch64 target to
make sure that the original r255821 commit for AArch64 didn't cause
similar breakage.

Also confirmed on x86_64-apple-darwin15 that reverting r257428 in
current llvm 3.8 branch eliminates both the libomp test suite failures
in openmp and those in the OpenMP3.1_Validation test suite.
         Jack
ps Are any of the buildbots currently building openmp on x86_64 and
running 'make check-libomp' on the resulting build? If not, one should
be set up so future regressions like Bug 26136 are caught, making
identification offending commits easier.

ps Are any of the buildbots currently building openmp on x86_64 and
running 'make check-libomp' on the resulting build?

http://lab.llvm.org:8011/builders/libomp-clang-x86_64-linux-debian

Recent Builds:

Time Revision Result Build # Info
Jan 14 16:35 257833 failure #43 Failed make check-libomp
Jan 12 10:23 257489 failure #42 Failed make check-libomp
Jan 11 14:45 257380 failure #41 Failed make check-libomp
Jan 04 16:16 256790 failure #40 Failed make check-libomp
Jan 04 13:28 256778 failure #39 Failed make check-libomp

So the problem isn’t that the tests aren’t being run, but that the results aren't being broadcast widely enough.

-- Jim

James Cownie <james.h.cownie@intel.com>
SSG/DPD/TCAR (Technical Computing, Analyzers and Runtimes)
Tel: +44 117 9071438

Jim,
The problem with the buildbots concerns version of the used clang
compiler - it is very old. We're trying to setup proper building/testing
process, but it requires some time

Best regards,
Alexey Bataev