LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 19469 - -polly-vectorizer=polly crash compiling ffmpeg (Unexpected scalar dependence in region!)
Summary: -polly-vectorizer=polly crash compiling ffmpeg (Unexpected scalar dependence ...
Status: RESOLVED FIXED
Alias: None
Product: Polly
Classification: Unclassified
Component: Optimizer (show other bugs)
Version: unspecified
Hardware: PC All
: P normal
Assignee: Polly Development Mailinglist
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-17 13:25 PDT by Jeremy Huddleston Sequoia
Modified: 2016-01-18 17:00 PST (History)
2 users (show)

See Also:
Fixed By Commit(s):


Attachments
qdm2-6dfcb3.c (333.00 KB, text/plain)
2014-04-17 13:27 PDT, Jeremy Huddleston Sequoia
Details
qdm2-6dfcb3.sh (1.10 KB, application/x-sh)
2014-04-17 13:27 PDT, Jeremy Huddleston Sequoia
Details
atrac3plusdec-561ff8.c (260.62 KB, text/plain)
2014-04-17 13:29 PDT, Jeremy Huddleston Sequoia
Details
atrac3plusdec-561ff8.sh (1.11 KB, text/plain)
2014-04-17 13:29 PDT, Jeremy Huddleston Sequoia
Details
qdm2-2ff87e..sh (1.10 KB, text/plain)
2014-04-18 02:41 PDT, Jeremy Huddleston Sequoia
Details
qdm2-2ff87e.c (333.00 KB, text/plain)
2014-04-18 02:42 PDT, Jeremy Huddleston Sequoia
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Huddleston Sequoia 2014-04-17 13:25:56 PDT
clang r206363
isl a64098e95e8c6404fa18f52fad75a8fd440c542f

Unexpected scalar dependence in region!
UNREACHABLE executed at CodeGen/BlockGenerators.cpp:217!
0  libLLVM-3.5.0svn.dylib 0x0000000111f1f4bb llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.5.0svn.dylib 0x0000000111f1f8ab SignalHandler(int) + 248
2  libsystem_c.dylib      0x00007fff8be1f90a _sigtramp + 26
3  libLLVM-3.5.0svn.dylib 0x0000000111902d71 bool llvm::DenseMapBase<llvm::DenseMap<llvm::DenseMapAPIntKeyInfo::KeyTy, llvm::ConstantInt*, llvm::DenseMapAPIntKeyInfo>, llvm::DenseMapAPIntKeyInfo::KeyTy, llvm::ConstantInt*, llvm::DenseMapAPIntKeyInfo>::LookupBucketFor<llvm::DenseMapAPIntKeyInfo::KeyTy>(llvm::DenseMapAPIntKeyInfo::KeyTy const&, std::__1::pair<llvm::DenseMapAPIntKeyInfo::KeyTy, llvm::ConstantInt*> const*&) const + 487
4  libLLVM-3.5.0svn.dylib 0x0000000111f1f712 abort + 22
5  libLLVM-3.5.0svn.dylib 0x0000000111f104d3 LLVMInstallFatalErrorHandler + 0
6  LLVMPolly.dylib        0x0000000113634f3e polly::BlockGenerator::copyInstScalar(llvm::Instruction const*, llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >&, llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*> >&) + 0
7  LLVMPolly.dylib        0x0000000113636000 polly::VectorBlockGenerator::generateUnknownStrideLoad(llvm::LoadInst const*, std::__1::vector<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >, std::__1::allocator<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> > > >&) + 238
8  LLVMPolly.dylib        0x0000000113636288 polly::VectorBlockGenerator::generateLoad(llvm::LoadInst const*, llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >&, std::__1::vector<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >, std::__1::allocator<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> > > >&) + 358
9  LLVMPolly.dylib        0x0000000113636d6d polly::VectorBlockGenerator::copyBB() + 197
10 LLVMPolly.dylib        0x000000011363c0d1 polly::ClastStmtCodeGen::codegen(clast_user_stmt const*, std::__1::vector<llvm::Value*, std::__1::allocator<llvm::Value*> >*, char const*, isl_set*) + 743
11 LLVMPolly.dylib        0x000000011363d1ce polly::ClastStmtCodeGen::codegenForVector(clast_for const*) + 550
12 LLVMPolly.dylib        0x000000011363d33c polly::ClastStmtCodeGen::codegen(clast_for const*) + 134
13 LLVMPolly.dylib        0x000000011363c1ca polly::ClastStmtCodeGen::codegen(clast_stmt const*) + 144
14 LLVMPolly.dylib        0x000000011363dfa3 (anonymous namespace)::CodeGeneration::runOnScop(polly::Scop&) + 385
15 LLVMPolly.dylib        0x000000011362f881 polly::ScopPass::runOnRegion(llvm::Region*, llvm::RGPassManager&) + 47
16 libLLVM-3.5.0svn.dylib 0x00000001116d93f8 llvm::RGPassManager::runOnFunction(llvm::Function&) + 738
17 libLLVM-3.5.0svn.dylib 0x000000011199b0c9 llvm::FPPassManager::runOnFunction(llvm::Function&) + 297
18 libLLVM-3.5.0svn.dylib 0x000000011199abd1 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 91
19 libLLVM-3.5.0svn.dylib 0x000000011199aa85 llvm::legacy::FunctionPassManager::run(llvm::Function&) + 81
20 clang                  0x000000010feeb3e1 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 5081
21 clang                  0x000000010ffd458b clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 557
22 clang                  0x0000000110029a47 clang::ParseAST(clang::Sema&, bool, bool) + 348
23 clang                  0x000000010ffd39eb clang::CodeGenAction::ExecuteAction() + 487
24 clang                  0x000000010fdd8c99 clang::FrontendAction::Execute() + 71
25 clang                  0x000000010fdb989a clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 568
26 clang                  0x000000010fd8e142 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3966
27 clang                  0x000000010fd873ec cc1_main(char const**, char const**, char const*, void*) + 908
28 clang                  0x000000010fd8c2da main + 6553
29 libdyld.dylib          0x00007fff8b3e57e1 start + 0
Stack dump:
0.	Program arguments: /opt/local/libexec/llvm-3.5/bin/clang -cc1 -triple i386-apple-macosx10.8.0 -emit-obj -disable-free -main-file-name qdm2.c -mrelocation-model dynamic-no-pic -masm-verbose -target-cpu yonah -target-linker-version 136 -gdwarf-2 -coverage-file /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-vectorize-3.5/build/libavcodec/qdm2.o -resource-dir /opt/local/libexec/llvm-3.5/bin/../lib/clang/3.5.0 -dependency-file libavcodec/qdm2.d -MT libavcodec/qdm2.o -D _ISOC99_SOURCE -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D HAVE_AV_CONFIG_H -D _GNU_SOURCE=1 -D _THREAD_SAFE -I . -I /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-vectorize-3.5/src/ -I /opt/local/include/SDL -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-vectorize-3.5/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 -fdiagnostics-show-option -vectorize-loops -vectorize-slp -load /opt/local/libexec/llvm-3.5/lib/LLVMPolly.dylib -mllvm -polly -mllvm -polly-vectorizer=polly -o libavcodec/qdm2.o -x c /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-vectorize-3.5/src/libavcodec/qdm2.c 
1.	<eof> parser at end of file
2.	Per-function optimization
3.	Running pass 'Region Pass Manager' on function '@qdm2_fft_generate_tone'
4.	Running pass 'Polly - Create LLVM-IR from SCoPs' on basic block '%for.body108'
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.5.0 (trunk 206363)
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/tmp/qdm2-6dfcb3.c
clang: note: diagnostic msg: /var/tmp/qdm2-6dfcb3.sh
clang: note: diagnostic msg: 

********************
make: *** [libavcodec/qdm2.o] Error 254
Comment 1 Jeremy Huddleston Sequoia 2014-04-17 13:27:27 PDT
Created attachment 12394 [details]
qdm2-6dfcb3.c
Comment 2 Jeremy Huddleston Sequoia 2014-04-17 13:27:38 PDT
Created attachment 12395 [details]
qdm2-6dfcb3.sh
Comment 3 Jeremy Huddleston Sequoia 2014-04-17 13:29:25 PDT
Created attachment 12396 [details]
atrac3plusdec-561ff8.c
Comment 4 Jeremy Huddleston Sequoia 2014-04-17 13:29:36 PDT
Created attachment 12397 [details]
atrac3plusdec-561ff8.sh
Comment 5 Tobias Grosser 2014-04-17 18:14:06 PDT
Fixed in r206510
Comment 6 Jeremy Huddleston Sequoia 2014-04-18 02:41:08 PDT
Looks like it's still there in r206540

Unexpected scalar dependence in region!
UNREACHABLE executed at CodeGen/BlockGenerators.cpp:217!
0  libLLVM-3.5.0svn.dylib 0x00000001109ecddb llvm::sys::PrintStackTrace(__sFILE*) + 40
1  libLLVM-3.5.0svn.dylib 0x00000001109ed1cb SignalHandler(int) + 248
2  libsystem_c.dylib      0x00007fff8be1f90a _sigtramp + 26
3  libLLVM-3.5.0svn.dylib 0x00000001103d048d bool llvm::DenseMapBase<llvm::DenseMap<llvm::DenseMapAPIntKeyInfo::KeyTy, llvm::ConstantInt*, llvm::DenseMapAPIntKeyInfo>, llvm::DenseMapAPIntKeyInfo::KeyTy, llvm::ConstantInt*, llvm::DenseMapAPIntKeyInfo>::LookupBucketFor<llvm::DenseMapAPIntKeyInfo::KeyTy>(llvm::DenseMapAPIntKeyInfo::KeyTy const&, std::__1::pair<llvm::DenseMapAPIntKeyInfo::KeyTy, llvm::ConstantInt*> const*&) const + 487
4  libLLVM-3.5.0svn.dylib 0x00000001109ed032 abort + 22
5  libLLVM-3.5.0svn.dylib 0x00000001109ddde3 LLVMInstallFatalErrorHandler + 0
6  LLVMPolly.dylib        0x00000001120f7f2e polly::BlockGenerator::copyInstScalar(llvm::Instruction const*, llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >&, llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >&, llvm::DenseMap<llvm::Loop const*, llvm::SCEV const*, llvm::DenseMapInfo<llvm::Loop const*> >&) + 0
7  LLVMPolly.dylib        0x00000001120f8ff0 polly::VectorBlockGenerator::generateUnknownStrideLoad(llvm::LoadInst const*, std::__1::vector<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >, std::__1::allocator<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> > > >&) + 238
8  LLVMPolly.dylib        0x00000001120f9278 polly::VectorBlockGenerator::generateLoad(llvm::LoadInst const*, llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >&, std::__1::vector<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> >, std::__1::allocator<llvm::DenseMap<llvm::Value const*, llvm::Value*, llvm::DenseMapInfo<llvm::Value const*> > > >&) + 358
9  LLVMPolly.dylib        0x00000001120f9d6f polly::VectorBlockGenerator::copyBB() + 197
10 LLVMPolly.dylib        0x00000001120ff0d1 polly::ClastStmtCodeGen::codegen(clast_user_stmt const*, std::__1::vector<llvm::Value*, std::__1::allocator<llvm::Value*> >*, char const*, isl_set*) + 743
11 LLVMPolly.dylib        0x00000001121001ce polly::ClastStmtCodeGen::codegenForVector(clast_for const*) + 550
12 LLVMPolly.dylib        0x000000011210033c polly::ClastStmtCodeGen::codegen(clast_for const*) + 134
13 LLVMPolly.dylib        0x00000001120ff1ca polly::ClastStmtCodeGen::codegen(clast_stmt const*) + 144
14 LLVMPolly.dylib        0x0000000112100fa3 (anonymous namespace)::CodeGeneration::runOnScop(polly::Scop&) + 385
15 LLVMPolly.dylib        0x00000001120f2871 polly::ScopPass::runOnRegion(llvm::Region*, llvm::RGPassManager&) + 47
16 libLLVM-3.5.0svn.dylib 0x00000001101a5b38 llvm::RGPassManager::runOnFunction(llvm::Function&) + 738
17 libLLVM-3.5.0svn.dylib 0x0000000110468a49 llvm::FPPassManager::runOnFunction(llvm::Function&) + 297
18 libLLVM-3.5.0svn.dylib 0x0000000110468551 llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 91
19 libLLVM-3.5.0svn.dylib 0x0000000110468405 llvm::legacy::FunctionPassManager::run(llvm::Function&) + 81
20 clang                  0x000000010e9b6765 clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::raw_ostream*) + 5081
21 clang                  0x000000010ea9ffd7 clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 557
22 clang                  0x000000010eaf52ef clang::ParseAST(clang::Sema&, bool, bool) + 348
23 clang                  0x000000010ea9f437 clang::CodeGenAction::ExecuteAction() + 487
24 clang                  0x000000010e8a3e55 clang::FrontendAction::Execute() + 71
25 clang                  0x000000010e88492c clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 568
26 clang                  0x000000010e859066 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 3966
27 clang                  0x000000010e8523ac cc1_main(char const**, char const**, char const*, void*) + 908
28 clang                  0x000000010e85722e main + 6553
29 libdyld.dylib          0x00007fff8b3e57e1 start + 0
30 libdyld.dylib          0x000000000000005c start + 1958848635
Stack dump:
0.	Program arguments: /opt/local/libexec/llvm-3.5/bin/clang -cc1 -triple i386-apple-macosx10.8.0 -emit-obj -disable-free -main-file-name qdm2.c -mrelocation-model dynamic-no-pic -masm-verbose -target-cpu yonah -target-linker-version 136 -gdwarf-2 -coverage-file /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-vectorize-3.5/build/libavcodec/qdm2.o -resource-dir /opt/local/libexec/llvm-3.5/bin/../lib/clang/3.5.0 -dependency-file libavcodec/qdm2.d -MT libavcodec/qdm2.o -D _ISOC99_SOURCE -D _FILE_OFFSET_BITS=64 -D _LARGEFILE_SOURCE -D HAVE_AV_CONFIG_H -D _GNU_SOURCE=1 -D _THREAD_SAFE -I . -I /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-vectorize-3.5/src/ -I /opt/local/include/SDL -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-vectorize-3.5/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 -fdiagnostics-show-option -vectorize-loops -vectorize-slp -load /opt/local/libexec/llvm-3.5/lib/LLVMPolly.dylib -mllvm -polly -mllvm -polly-vectorizer=polly -o libavcodec/qdm2.o -x c /Users/jeremy/src/ffmpeg/fate/i386-darwin-clang-polly-vectorize-3.5/src/libavcodec/qdm2.c 
1.	<eof> parser at end of file
2.	Per-function optimization
3.	Running pass 'Region Pass Manager' on function '@qdm2_fft_generate_tone'
4.	Running pass 'Polly - Create LLVM-IR from SCoPs' on basic block '%for.body108'
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.5.0 (trunk 206540)
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/qdm2-2ff87e.c
clang: note: diagnostic msg: /var/folders/yk/q1qsnnm53ms89plrqm9yrqc00000gn/T/qdm2-2ff87e.sh
clang: note: diagnostic msg: 

********************
make: *** [libavcodec/qdm2.o] Error 254
Comment 7 Jeremy Huddleston Sequoia 2014-04-18 02:41:48 PDT
Created attachment 12402 [details]
qdm2-2ff87e..sh
Comment 8 Jeremy Huddleston Sequoia 2014-04-18 02:42:06 PDT
Created attachment 12403 [details]
qdm2-2ff87e.c
Comment 9 Tobias Grosser 2014-04-18 06:29:32 PDT
Fix num. II in r206577.
Comment 10 Tanya Lattner 2016-01-18 17:00:51 PST
Move to Polly Product.