Clang ToT bots failing with "Cannot emit physreg copy instruction" |
||
Issue descriptionE.g. https://build.chromium.org/p/chromium.fyi/builders/ClangToTLinuxUBSanVptr/builds/6849 https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/15069 FAILED: obj/third_party/sqlite/chromium_sqlite3/sqlite3.o export DEVELOPER_DIR=/b/c/builder/ClangToTMac/src/build/mac_files/Xcode.app; ../../third_party/llvm-build/Release+Asserts/bin/clang -MMD -MF obj/third_party/sqlite/chromium_sqlite3/sqlite3.o.d -DSQLITE_ENABLE_FTS3 -DSQLITE_DISABLE_FTS3_UNICODE -DSQLITE_DISABLE_FTS4_DEFERRED -DSQLITE_ENABLE_ICU -DSQLITE_ENABLE_MEMORY_MANAGEMENT -DSQLITE_SECURE_DELETE -DSQLITE_SEPARATE_CACHE_POOLS -DSQLITE_THREADSAFE=1 -DSQLITE_MAX_WORKER_THREADS=0 -DSQLITE_MAX_MMAP_SIZE=268435456 -DSQLITE_MMAP_READ_ONLY=1 -DSQLITE_DEFAULT_PCACHE_INITSZ=0 -DSQLITE_API=__attribute__\(\(visibility\(\"default\"\)\)\) -DHAVE_USLEEP=1 -DUSE_PREAD=1 -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"314905\" -DCR_XCODE_VERSION=0832 -DCOMPONENT_BUILD -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DU_USING_ICU_NAMESPACE=0 -DU_ENABLE_DYLOAD=0 -DICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -DUCHAR_TYPE=uint16_t -I../../third_party/sqlite/amalgamation -I../.. -Igen -I../../third_party/icu/source/common -I../../third_party/icu/source/i18n -fno-strict-aliasing -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -Xclang -mllvm -Xclang -instcombine-lower-dbg-declare=1 -arch x86_64 -O2 -fno-omit-frame-pointer -g1 -isysroot ../../build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.9.0 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-unsigned-enum-zero-compare -Wno-unused-function -std=c11 -c ../../third_party/sqlite/amalgamation/sqlite3.c -o obj/third_party/sqlite/chromium_sqlite3/sqlite3.o Cannot emit physreg copy instruction UNREACHABLE executed at /b/c/builder/ClangToTMac/src/third_party/llvm/lib/Target/X86/X86InstrInfo.cpp:6760! 0 clang-6.0 0x0000000108e94fc8 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40 1 clang-6.0 0x0000000108e956c6 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 838 2 libsystem_platform.dylib 0x00007fffebb66bba _sigtramp + 26 3 libsystem_platform.dylib 0x00007fff5868b860 _sigtramp + 1823624384 4 libsystem_c.dylib 0x00007fffeb9ed420 abort + 129 5 clang-6.0 0x0000000108e20ad7 llvm::llvm_unreachable_internal(char const*, char const*, unsigned int) + 471 6 clang-6.0 0x00000001081737d9 llvm::X86InstrInfo::copyPhysReg(llvm::MachineBasicBlock&, llvm::MachineInstrBundleIterator<llvm::MachineInstr, false>, llvm::DebugLoc const&, unsigned int, unsigned int, bool) const + 6409 7 clang-6.0 0x00000001084d2119 llvm::initializeExpandPostRAPass(llvm::PassRegistry&) + 3737 8 clang-6.0 0x00000001085ae294 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 180 9 clang-6.0 0x000000010889efd3 llvm::FPPassManager::runOnFunction(llvm::Function&) + 547 10 clang-6.0 0x000000010889f233 llvm::FPPassManager::runOnModule(llvm::Module&) + 51 11 clang-6.0 0x000000010889f77e llvm::legacy::PassManagerImpl::run(llvm::Module&) + 958 12 clang-6.0 0x00000001090ce7c3 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) + 15571 13 clang-6.0 0x0000000109329175 clang::EmitObjAction::EmitObjAction(llvm::LLVMContext*) + 2341 14 clang-6.0 0x0000000109dac495 clang::ParseAST(clang::Sema&, bool, bool) + 469 15 clang-6.0 0x00000001095bcfcc clang::FrontendAction::Execute() + 76 16 clang-6.0 0x0000000109575cf1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1217 17 clang-6.0 0x00000001096244ba clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4970 18 clang-6.0 0x0000000107575367 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1399 19 clang-6.0 0x00000001075739ef main + 11951 20 libdyld.dylib 0x00007fffeb959255 start + 1 21 libdyld.dylib 0x00000000000000ac start + 342519384 Stack dump: 0. Program arguments: /b/c/builder/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/clang-6.0 -cc1 -triple x86_64-apple-macosx10.9.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-obj -disable-free -main-file-name sqlite3.c -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -faligned-alloc-unavailable -target-cpu core2 -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=2 -debugger-tuning=lldb -target-linker-version 274.1 -coverage-notes-file /b/c/builder/ClangToTMac/src/out/Release/obj/third_party/sqlite/chromium_sqlite3/sqlite3.gcno -resource-dir /b/c/builder/ClangToTMac/src/third_party/llvm-build/Release+Asserts/lib/clang/6.0.0 -dependency-file obj/third_party/sqlite/chromium_sqlite3/sqlite3.o.d -MT obj/third_party/sqlite/chromium_sqlite3/sqlite3.o -isysroot ../../build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -D SQLITE_ENABLE_FTS3 -D SQLITE_DISABLE_FTS3_UNICODE -D SQLITE_DISABLE_FTS4_DEFERRED -D SQLITE_ENABLE_ICU -D SQLITE_ENABLE_MEMORY_MANAGEMENT -D SQLITE_SECURE_DELETE -D SQLITE_SEPARATE_CACHE_POOLS -D SQLITE_THREADSAFE=1 -D SQLITE_MAX_WORKER_THREADS=0 -D SQLITE_MAX_MMAP_SIZE=268435456 -D SQLITE_MMAP_READ_ONLY=1 -D SQLITE_DEFAULT_PCACHE_INITSZ=0 -D SQLITE_API=__attribute__((visibility("default"))) -D HAVE_USLEEP=1 -D USE_PREAD=1 -D V8_DEPRECATION_WARNINGS -D NO_TCMALLOC -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D CHROMIUM_BUILD -D FIELDTRIAL_TESTING_ENABLED -D CR_CLANG_REVISION="314905" -D CR_XCODE_VERSION=0832 -D COMPONENT_BUILD -D __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D U_USING_ICU_NAMESPACE=0 -D U_ENABLE_DYLOAD=0 -D ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE -D UCHAR_TYPE=uint16_t -I ../../third_party/sqlite/amalgamation -I ../.. -I gen -I ../../third_party/icu/source/common -I ../../third_party/icu/source/i18n -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -O2 -Wno-builtin-macro-redefined -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Werror -Wall -Wno-unused-variable -Wunguarded-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wno-enum-compare-switch -Wno-tautological-unsigned-zero-compare -Wno-null-pointer-arithmetic -Wno-tautological-unsigned-enum-zero-compare -Wno-unused-function -std=c11 -fdebug-compilation-dir /b/c/builder/ClangToTMac/src/out/Release -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -stack-protector 1 -fblocks -fencode-extended-block-signature -fobjc-runtime=macosx-10.9.0 -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -mllvm -instcombine-lower-dbg-declare=1 -o obj/third_party/sqlite/chromium_sqlite3/sqlite3.o -x c ../../third_party/sqlite/amalgamation/sqlite3.c 1. <eof> parser at end of file 2. Code generation 3. Running pass 'Function Pass Manager' on module '../../third_party/sqlite/amalgamation/sqlite3.c'. 4. Running pass 'Post-RA pseudo instruction expansion pass' on function '@walIndexWriteHdr' clang-6.0: error: unable to execute command: Abort trap: 6 clang-6.0: error: clang frontend command failed due to signal (use -v to see invocation) clang version 6.0.0 (trunk 314905) Target: x86_64-apple-darwin16.3.0 Thread model: posix InstalledDir: /b/c/builder/ClangToTMac/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin clang-6.0: 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-6.0: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-6.0: note: diagnostic msg: /b/rr/tmpTs51JE/t/sqlite3-74212c.c clang-6.0: note: diagnostic msg: /b/rr/tmpTs51JE/t/sqlite3-74212c.sh clang-6.0: note: diagnostic msg: /b/rr/tmpTs51JE/t/sqlite3-74212c.crash clang-6.0: note: diagnostic msg: ********************
,
Oct 4 2017
Some potential candidates: ------------------------------------------------------------------------ r314876 | mstorsjo | 2017-10-03 22:12:10 -0700 (Tue, 03 Oct 2017) | 13 lines [X86] Fix using the SJLJ jump table on x86_64 The previous version didn't work if the jump table base address didn't fit in 32 bit, since it was encoded as an immediate offset. And in case the jump table is encoded as 32 bit label differences, we need to load and add them to the table base first. This solves the first half of the issues mentioned in PR34720. Also fix some of the errors pointed out by -verify-machineinstrs, by using GR32_NOSPRegClass. Differential Revision: https://reviews.llvm.org/D38333 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r314882 | uabelho | 2017-10-04 00:42:45 -0700 (Wed, 04 Oct 2017) | 27 lines Recommit [UnreachableBlockElim] Use COPY if PHI input is undef This time invoking llc with "-march=x86-64" in the testcase, so we don't assume the default target is x86. Summary: If we have %vreg0<def> = PHI %vreg2<undef>, <BB#0>, %vreg3, <BB#2>; GR32:%vreg0,%vreg2,%vreg3 %vreg3<def,tied1> = ADD32ri8 %vreg0<kill,tied0>, 1, %EFLAGS<imp-def>; GR32:%vreg3,%vreg0 then we can't just change %vreg0 into %vreg3, since %vreg2 is actually undef. We would have to also copy the undef flag to be able to change the register. Instead we deal with this case like other cases where we can't just replace the register: we insert a COPY. The code creating the COPY already copied all flags from the PHI input, so the undef flag will be transferred as it should. Reviewers: kparzysz Reviewed By: kparzysz Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D38235 ------------------------------------------------------------------------ ------------------------------------------------------------------------ r314886 | jbhateja | 2017-10-04 02:02:10 -0700 (Wed, 04 Oct 2017) | 33 lines [X86] Improvement in CodeGen instruction selection for LEAs (re-applying post required revision changes.) Summary: 1/ Operand folding during complex pattern matching for LEAs has been extended, such that it promotes Scale to accommodate similar operand appearing in the DAG. e.g. T1 = A + B T2 = T1 + 10 T3 = T2 + A For above DAG rooted at T3, X86AddressMode will no look like Base = B , Index = A , Scale = 2 , Disp = 10 2/ During OptimizeLEAPass down the pipeline factorization is now performed over LEAs so that if there is an opportunity then complex LEAs (having 3 operands) could be factored out. e.g. leal 1(%rax,%rcx,1), %rdx leal 1(%rax,%rcx,2), %rcx will be factored as following leal 1(%rax,%rcx,1), %rdx leal (%rdx,%rcx) , %edx 3/ Aggressive operand folding for AM based selection for LEAs is sensitive to loops, thus avoiding creation of any complex LEAs within a loop. Reviewers: lsaba, RKSimon, craig.topper, qcolombet, jmolloy Reviewed By: lsaba Subscribers: jmolloy, spatel, igorb, llvm-commits Differential Revision: https://reviews.llvm.org/D35014 ------------------------------------------------------------------------
,
Oct 4 2017
Attaching the repro.
,
Oct 4 2017
Upstream bug: https://bugs.llvm.org/show_bug.cgi?id=34830
,
Oct 4 2017
Bisection points to r314886. Preparing revert..
,
Oct 4 2017
,
Oct 4 2017
Issue 771676 has been merged into this issue.
,
Oct 4 2017
Issue 771673 has been merged into this issue. |
||
►
Sign in to add a comment |
||
Comment 1 by h...@chromium.org
, Oct 4 2017