-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
"level out of range" assert fail in DependenceAnalysis #50612
Labels
Comments
Still crashing: https://llvm.godbolt.org/z/5o9v1bWK8 Minimal IR reproducer:
|
All the reproducers pass with the proposed patch in https://reviews.llvm.org/D110973. |
That's great, thanks @bmahjour! |
https://reviews.llvm.org/D110973 landed today. All three attached IR reproducers are now analyzed without crashing. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Extended Description
Each of these three tests (fasta.ll, GCC-C-execute-960327-1.ll, GCC-C-execute-pr33870.ll) triggers an assertion failure when DependenceInfo is applied to every pair of instructions. For example:
opt --da --analyze GCC-C-execute-960327-1.ll
...
Printing analysis 'Dependence Analysis' for function 'f':
...
Src: %7 = load i8, i8* %6, align 1, !tbaa !7 --> Dst: store i16 88, i16* %10, align 1
da analyze - opt: /build/llvm/lib/Analysis/DependenceAnalysis.cpp:1157: bool llvm::DependenceInfo::strongSIVtest(const llvm::SCEV*, const llvm::SCEV*, const llvm::SCEV*, const llvm::Loop*, unsigned int, llvm::FullDependence&, llvm::DependenceInfo::Constraint&) const: Assertion `0 < Level && Level <= CommonLevels && "level out of range"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: opt --da --analyze GCC-C-execute-960327-1.ll
#0 0x00007fb1b3a0135d llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0xd8e35d)
#1 0x00007fb1b39ff5f4 llvm::sys::RunSignalHandlers() (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0xd8c5f4)
#2 0x00007fb1b39ff77e SignalHandler(int) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0xd8c77e)
#3 0x00007fb1b2c65700 __restore_rt (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libpthread.so.0+0x13700)
#4 0x00007fb1b279933a raise (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6+0x3c33a)
#5 0x00007fb1b2783523 abort (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6+0x26523)
#6 0x00007fb1b278341f _nl_load_domain.cold.0 (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6+0x2641f)
#7 0x00007fb1b2791d92 (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6+0x34d92)
#8 0x00007fb1b4fec109 llvm::DependenceInfo::strongSIVtest(llvm::SCEV const*, llvm::SCEV const*, llvm::SCEV const*, llvm::Loop const*, unsigned int, llvm::FullDependence&, llvm::DependenceInfo::Constraint&) const (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0x2379109)
#9 0x00007fb1b4ff29b3 llvm::DependenceInfo::testSIV(llvm::SCEV const*, llvm::SCEV const*, unsigned int&, llvm::FullDependence&, llvm::DependenceInfo::Constraint&, llvm::SCEV const*&) const (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0x237f9b3)
#10 0x00007fb1b4ff8e2c llvm::DependenceInfo::depends(llvm::Instruction*, llvm::Instruction*, bool) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0x2385e2c)
#11 0x00007fb1b4ffc201 dumpExampleDependence(llvm::raw_ostream&, llvm::DependenceInfo*) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0x2389201)
#12 0x00000000004310d7 (anonymous namespace)::FunctionPassPrinter::runOnFunction(llvm::Function&) (/nix/store/lpxb0f7wjfm69g9j7m2gncs1mgbx8q35-llvm-12.0.0/bin/opt+0x4310d7)
#13 0x00007fb1b3b66fad llvm::FPPassManager::runOnFunction(llvm::Function&) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0xef3fad)
#14 0x00007fb1b3b67691 llvm::FPPassManager::runOnModule(llvm::Module&) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0xef4691)
#15 0x00007fb1b3b66963 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/nix/store/iqm3zq1acrf4g922rgldc6h8jr9vl9cr-llvm-12.0.0-lib/lib/libLLVM-12.so+0xef3963)
#16 0x0000000000421799 main (/nix/store/lpxb0f7wjfm69g9j7m2gncs1mgbx8q35-llvm-12.0.0/bin/opt+0x421799)
#17 0x00007fb1b2784ded __libc_start_main (/nix/store/sbbifs2ykc05inws26203h0xwcadnf0l-glibc-2.32-46/lib/libc.so.6+0x27ded)
#18 0x000000000042234a _start (/nix/store/lpxb0f7wjfm69g9j7m2gncs1mgbx8q35-llvm-12.0.0/bin/opt+0x42234a)
The text was updated successfully, but these errors were encountered: