[llvm-bugs] [Bug 52170] New: opt -passes='loop-interchange' crashes with "bad subscript classification UNREACHABLE executed at ../lib/Analysis/DependenceAnalysis.cpp:3833!"
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 13 22:36:43 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=52170
Bug ID: 52170
Summary: opt -passes='loop-interchange' crashes with "bad
subscript classification UNREACHABLE executed at
../lib/Analysis/DependenceAnalysis.cpp:3833!"
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Global Analyses
Assignee: unassignedbugs at nondot.org
Reporter: mikael.holmen at ericsson.com
CC: llvm-bugs at lists.llvm.org
Created attachment 25363
--> https://bugs.llvm.org/attachment.cgi?id=25363&action=edit
bbi-61519.ll reproducer
llvm commit: 0fbd3aad75f95
Reproduce with:
opt -passes='loop-interchange' -o /dev/null bbi-61519.ll
Result:
bad subscript classification
UNREACHABLE executed at ../lib/Analysis/DependenceAnalysis.cpp:3833!
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0. Program arguments: ../../master-github/llvm/build-all/bin/opt
-passes=loop-interchange -o /dev/null bbi-61519.ll
#0 0x0000000002b5b8c3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(../../master-github/llvm/build-all/bin/opt+0x2b5b8c3)
#1 0x0000000002b5953e llvm::sys::RunSignalHandlers()
(../../master-github/llvm/build-all/bin/opt+0x2b5953e)
#2 0x0000000002b5bc46 SignalHandler(int) Signals.cpp:0:0
#3 0x00007efe70534630 __restore_rt sigaction.c:0:0
#4 0x00007efe6dc67387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007efe6dc68a78 abort (/lib64/libc.so.6+0x37a78)
#6 0x0000000002ad8d5f (../../master-github/llvm/build-all/bin/opt+0x2ad8d5f)
#7 0x0000000001a4e606 llvm::DependenceInfo::depends(llvm::Instruction*,
llvm::Instruction*, bool)
(../../master-github/llvm/build-all/bin/opt+0x1a4e606)
#8 0x00000000028ec1db (anonymous
namespace)::LoopInterchange::processLoopList(llvm::ArrayRef<llvm::Loop*>)
LoopInterchange.cpp:0:0
#9 0x00000000028eb21a llvm::LoopInterchangePass::run(llvm::LoopNest&,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&)
(../../master-github/llvm/build-all/bin/opt+0x28eb21a)
#10 0x0000000002e606dd llvm::detail::PassModel<llvm::LoopNest,
llvm::LoopInterchangePass, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::LoopNest&,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) crtstuff.c:0:0
#11 0x0000000003375b6c llvm::Optional<llvm::PreservedAnalyses>
llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop,
llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&,
llvm::LPMUpdater&>::runSinglePass<llvm::LoopNest,
std::unique_ptr<llvm::detail::PassConcept<llvm::LoopNest,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>,
std::default_delete<llvm::detail::PassConcept<llvm::LoopNest,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&> > > >(llvm::LoopNest&,
std::unique_ptr<llvm::detail::PassConcept<llvm::LoopNest,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>,
std::default_delete<llvm::detail::PassConcept<llvm::LoopNest,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&> > >&,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&,
llvm::PassInstrumentation&)
(../../master-github/llvm/build-all/bin/opt+0x3375b6c)
#12 0x0000000003374fb3 llvm::PassManager<llvm::Loop,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&,
llvm::LPMUpdater&>::runWithLoopNestPasses(llvm::Loop&,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&)
(../../master-github/llvm/build-all/bin/opt+0x3374fb3)
#13 0x0000000003374b91 llvm::PassManager<llvm::Loop,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::run(llvm::Loop&,
llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&,
llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&)
(../../master-github/llvm/build-all/bin/opt+0x3374b91)
#14 0x0000000002e3256d llvm::detail::PassModel<llvm::Loop,
llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop,
llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&,
llvm::LPMUpdater&>, llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Loop,
llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&,
llvm::LPMUpdater&>::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop,
llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&,
llvm::LPMUpdater&) crtstuff.c:0:0
#15 0x0000000003376a6b llvm::FunctionToLoopPassAdaptor::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(../../master-github/llvm/build-all/bin/opt+0x3376a6b)
#16 0x0000000002e4dc8d llvm::detail::PassModel<llvm::Function,
llvm::FunctionToLoopPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#17 0x0000000002308fd5 llvm::PassManager<llvm::Function,
llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&,
llvm::AnalysisManager<llvm::Function>&)
(../../master-github/llvm/build-all/bin/opt+0x2308fd5)
#18 0x0000000000ad615d llvm::detail::PassModel<llvm::Function,
llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >,
llvm::PreservedAnalyses, llvm::AnalysisManager<llvm::Function>
>::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) crtstuff.c:0:0
#19 0x000000000230d356 llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x230d356)
#20 0x000000000078f47d llvm::detail::PassModel<llvm::Module,
llvm::ModuleToFunctionPassAdaptor, llvm::PreservedAnalyses,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&) crtstuff.c:0:0
#21 0x0000000002308118 llvm::PassManager<llvm::Module,
llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&,
llvm::AnalysisManager<llvm::Module>&)
(../../master-github/llvm/build-all/bin/opt+0x2308118)
#22 0x00000000007872a2 llvm::runPassPipeline(llvm::StringRef, llvm::Module&,
llvm::TargetMachine*, llvm::TargetLibraryInfoImpl*, llvm::ToolOutputFile*,
llvm::ToolOutputFile*, llvm::ToolOutputFile*, llvm::StringRef,
llvm::ArrayRef<llvm::StringRef>, llvm::opt_tool::OutputKind,
llvm::opt_tool::VerifierKind, bool, bool, bool, bool, bool)
(../../master-github/llvm/build-all/bin/opt+0x7872a2)
#23 0x0000000000799e86 main
(../../master-github/llvm/build-all/bin/opt+0x799e86)
#24 0x00007efe6dc53555 __libc_start_main (/lib64/libc.so.6+0x22555)
#25 0x00000000007826fc _start
(../../master-github/llvm/build-all/bin/opt+0x7826fc)
Abort
Starts crashing with commit 7086025d65675:
[Dependence Analysis] Enable delinearization of fixed sized arrays
Patch by Artem Radzikhovskyy!
Allow delinearization of fixed sized arrays if we can prove that the GEP
indices do not overflow the array dimensions. The checks applied are similar to
the ones that are used for delinearization of parametric size arrays. Make sure
that the GEP indices are non-negative and that they are smaller than the range
of that dimension.
Changes Summary:
- Updated the LIT tests with more exact values, as we are able to
delinearize and apply more exact tests
- profitability.ll - now able to delinearize in all cases, no need to use
-da-disable-delinearization-checks flag and run the test twice
- loop-interchange-optimization-remarks.ll - in one of the cases we are
able to delinearize without using -da-disable-delinearization-checks
- SimpleSIVNoValidityCheckFixedSize.ll - removed unnecessary
"-da-disable-delinearization-checks" flag. Now can get the exact answer without
it.
- SimpleSIVNoValidityCheckFixedSize.ll and
PreliminaryNoValidityCheckFixedSize.ll - made negative tests more explicit, in
order to demonstrate the need for "-da-disable-delinearization-checks" flag
Differential Revision: https://reviews.llvm.org/D101486
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20211014/961cc73a/attachment.html>
More information about the llvm-bugs
mailing list