Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-polly-vectorizer=polly crash compiling ffmpeg (Unexpected scalar dependence in region!) #19843

Closed
jeremyhu mannequin opened this issue Apr 17, 2014 · 6 comments
Closed
Labels
bugzilla Issues migrated from bugzilla polly

Comments

@jeremyhu
Copy link
Mannequin

jeremyhu mannequin commented Apr 17, 2014

Bugzilla Link 19469
Resolution FIXED
Resolved on Jan 18, 2016 17:00
Version unspecified
OS All
Attachments qdm2-6dfcb3.c, qdm2-6dfcb3.sh, atrac3plusdec-561ff8.c, atrac3plusdec-561ff8.sh
CC @tobiasgrosser

Extended Description

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>::LookupBucketForllvm::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::allocatorllvm::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. 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

@tobiasgrosser
Copy link
Contributor

Fixed in r206510

@jeremyhu
Copy link
Mannequin Author

jeremyhu mannequin commented Apr 18, 2014

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>::LookupBucketForllvm::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::allocatorllvm::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. 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

@jeremyhu
Copy link
Mannequin Author

jeremyhu mannequin commented Apr 18, 2014

qdm2-2ff87e..sh

@jeremyhu
Copy link
Mannequin Author

jeremyhu mannequin commented Apr 18, 2014

qdm2-2ff87e.c

@tobiasgrosser
Copy link
Contributor

Fix num. II in r206577.

@tlattner
Copy link
Contributor

Move to Polly Product.

@llvmbot llvmbot transferred this issue from llvm/llvm-bugzilla-archive Dec 9, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugzilla Issues migrated from bugzilla polly
Projects
None yet
Development

No branches or pull requests

2 participants