Current ffmpeg fails to build with recent llvm + polly Assertion failed: (isa<Argument>(Val) && "Unknown live-in to the entry block"), function solveBlockValueNonLocal, file LazyValueInfo.cpp, line 638. 0 libLLVM-3.6svn.dylib 0x00000001111857b6 llvm::sys::PrintStackTrace(__sFILE*) + 57 1 libLLVM-3.6svn.dylib 0x0000000111185ca3 SignalHandler(int) + 220 2 libsystem_c.dylib 0x00007fff9121b90a _sigtramp + 26 3 libsystem_c.dylib 0x00007fcacc042178 _sigtramp + 987916424 4 libLLVM-3.6svn.dylib 0x0000000111185b26 abort + 22 5 libLLVM-3.6svn.dylib 0x0000000111185b10 abort + 0 6 libLLVM-3.6svn.dylib 0x00000001107dcfe0 (anonymous namespace)::LazyValueInfoCache::solve() + 8240 7 libLLVM-3.6svn.dylib 0x00000001107d81c9 (anonymous namespace)::LazyValueInfoCache::getValueOnEdge(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::Instruction*) + 315 8 libLLVM-3.6svn.dylib 0x00000001107d7fd6 llvm::LazyValueInfo::getConstantOnEdge(llvm::Value*, llvm::BasicBlock*, llvm::BasicBlock*, llvm::Instruction*) + 72 9 libLLVM-3.6svn.dylib 0x0000000110f224f3 (anonymous namespace)::CorrelatedValuePropagation::runOnFunction(llvm::Function&) + 1003 10 libLLVM-3.6svn.dylib 0x0000000110b1c6e3 llvm::FPPassManager::runOnFunction(llvm::Function&) + 297 11 libLLVM-3.6svn.dylib 0x00000001113c61d3 (anonymous namespace)::CGPassManager::runOnModule(llvm::Module&) + 1563 12 libLLVM-3.6svn.dylib 0x0000000110b1cbd0 llvm::legacy::PassManagerImpl::run(llvm::Module&) + 646 13 clang 0x000000010ed64f62 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 6016 14 clang 0x000000010ee5c295 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 527 15 clang 0x000000010eecd0bf clang::ParseAST(clang::Sema&, bool, bool) + 384 16 clang 0x000000010ee5b44b clang::CodeGenAction::ExecuteAction() + 519 17 clang 0x000000010ec2853d clang::FrontendAction::Execute() + 67 18 clang 0x000000010ec03eff clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 547 19 clang 0x000000010ebd3e1f clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3931 20 clang 0x000000010ebcc7dc cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 940 21 clang 0x000000010ebd2392 main + 8101 22 libdyld.dylib 0x00007fff912177e1 start + 0 Stack dump: 0. Program arguments: /opt/local/libexec/llvm-3.6/bin/clang -cc1 -triple i386-apple-macosx10.8.0 -emit-obj -disable-free -main-file-name bink.c -mrelocation-model dynamic-no-pic -mthread-model posix -masm-verbose -target-cpu yonah -target-linker-version 236.3 -gdwarf-2 -dwarf-column-info -coverage-file /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-3.6/build/libavcodec/bink.o -resource-dir /opt/local/libexec/llvm-3.6/bin/../lib/clang/3.6.0 -dependency-file libavcodec/bink.d -MT libavcodec/bink.o -D _ISOC99_SOURCE -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D ZLIB_CONST -D HAVE_AV_CONFIG_H -D _GNU_SOURCE=1 -D _THREAD_SAFE -I . -I /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-3.6/src/ -I /opt/local/include/SDL -I /opt/local/include -I /opt/local/include -I /opt/local/include -I /opt/local/include -O3 -Wdeclaration-after-statement -Wall -Wdisabled-optimization -Wpointer-arith -Wredundant-decls -Wwrite-strings -Wtype-limits -Wundef -Wmissing-prototypes -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -std=c99 -fconst-strings -fdebug-compilation-dir /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-3.6/build -ferror-limit 19 -fmessage-length 0 -pthread -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-fragile-10.8.0 -fobjc-subscripting-legacy-runtime -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -vectorize-loops -vectorize-slp -load /opt/local/libexec/llvm-3.6/lib/LLVMPolly.dylib -mllvm -polly -o libavcodec/bink.o -x c /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-3.6/src/libavcodec/bink.c 1. <eof> parser at end of file 2. Per-module optimization passes 3. Running pass 'CallGraph Pass Manager' on module '/Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-3.6/src/libavcodec/bink.c'. 4. Running pass 'Value Propagation' on function '@read_dct_coeffs' clang: error: unable to execute command: Illegal instruction: 4 clang: error: clang frontend command failed due to signal (use -v to see invocation) clang version 3.6.0 (trunk 224827) Target: i386-apple-darwin12.5.0 Thread model: posix clang: 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: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang: note: diagnostic msg: /var/folders/yk/q1qsnnm53ms89plrqm9yrqc00000gn/T/bink-08aa2c.c clang: note: diagnostic msg: /var/folders/yk/q1qsnnm53ms89plrqm9yrqc00000gn/T/bink-08aa2c.sh clang: note: diagnostic msg: ********************
Created attachment 13612 [details] bink-08aa2c.c.xz
Created attachment 13613 [details] bink-08aa2c.sh
Created attachment 13720 [details] Reduced test case produced by bugpoint
Created attachment 13880 [details] Test case manually reduced further It seems the we later introduce a LIV that makes code-generating this SCoP invalid.
Johannes, maybe your new scalar codegeneration will solve this issue?
Fixed in r233477
Move to Polly Product.