<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=http://email.email.llvm.org/c/eJztWltz2jgY_TXwoglj5PsDD5Qms5lttpkmm31kZFsGbWXJK8lJs79-P9ncZEgg23S2zZYBA5Z0vss5-rCQM1k8Tji_r1Auq4qZgT9FAQlwTnHoJcnAez_wpp9orWTR5BQ9MLOELt1pJGuDzriU9ZmiSnKOziQa4IuC3sNRNHAiy9hZFERxMuK8G7RG1A03GyQAsoZHIxjHWQbHW0WELqWqNHy5yQknCj58AFufWlPXROtRXtcwLPIiO_hesgKsJ0RI8VjJRiNBKqprktMBTq0pf7od333P4RPNzbXUmmWcXt6BtcRmY9sdIKcDPHsp8k1FOL8U2qgmN0yKOzAjFaBE3RA01Zoq24IGkTfAYwswk8IAxOVd1y-CN3whG1Eg8yCRTTSw1HZBUvBHdHkHHQY4RiVhnBajLpnXH86nN-dINxnwiQjKmgVStJbKICPR0phaWx_xBTyhTY9swCOpFvAdETDGRM6bgiKzpChXRC9RRvLPRkG8KxM3Bk6goqnqDYUeNKXXSi4UqRBRi6aiwlhDYJ_x4gzSYe0xAcd_oxvo4HvI--KtHziPvaz00ZYu_ai7D9eKCdP6eKtaknY4VeRhLoEWSqo2yTMI1wAnluCDng7wO-_LypjlbuPN2PUmoklED3nzqRE3bCEI_wWSy6myGjvBYIvnGMT98Ms4Qg40QK6i6U6vp4jXvjZA_gooLkkR-WkcR5Da-VxRDRqlcxCKZgvS6naU7w8PdoePPUL8JEaKME1RG5qdwlHQvecjLUdRG5IfQT8noLAHlJE4QSSzSn0WKIZ-DlDUA_LHJIKASDvH5nZ2zDNyxD1cwiAHNe6j4hAfgYAeDkTiUEbGkAH60lKiGvFR2JN7taktTSk6WBV7nKWuI15Jkgy5aFuIjd0DFtspsz05BZU9aqaviCALEKA_6w-Y9czAvBQFUcV6ZPdToC2yf76Hf2SE2_f66ve6IMbOg-j4DOuSsKHLzmi3wJRJOs6LHQMFNSClVY2BPF3JgvITQt7JrNN2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gK4g0Cj4IG-eYmgqFqbyc5s3cWQCNn2mzvMBhCjWMLQWnrMHhomOF0snc_QMsb1R1t3-JOiWEb56QN8h-lD9Mo>53128</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
opt -loop-reroll crashes with Assertion `!LoopControlIV && "Found two loop control only IV"' failed.
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
mikaelholmen
</td>
</tr>
</table>
<pre>
llvm commit: 4a42ce25088
Reproduce with:
opt -loop-reroll -o /dev/null bbi-64678.ll
Result:
opt: ../lib/Transforms/Scalar/LoopRerollPass.cpp:606: void (anonymous namespace)::LoopReroll::collectPossibleIVs(llvm::Loop *, (anonymous namespace)::LoopReroll::SmallInstructionVector &): Assertion `!LoopControlIV && "Found two loop control only IV"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: build-all/bin/opt -loop-reroll -o /dev/null bbi-64678.ll
#0 0x0000000002c70bf3 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (build-all/bin/opt+0x2c70bf3)
#1 0x0000000002c6e86e llvm::sys::RunSignalHandlers() (build-all/bin/opt+0x2c6e86e)
#2 0x0000000002c70f76 SignalHandler(int) Signals.cpp:0:0
#3 0x00007fad63977630 __restore_rt sigaction.c:0:0
#4 0x00007fad610aa387 raise (/lib64/libc.so.6+0x36387)
#5 0x00007fad610aba78 abort (/lib64/libc.so.6+0x37a78)
#6 0x00007fad610a31a6 __assert_fail_base (/lib64/libc.so.6+0x2f1a6)
#7 0x00007fad610a3252 (/lib64/libc.so.6+0x2f252)
#8 0x0000000002a1387e (anonymous namespace)::LoopReroll::runOnLoop(llvm::Loop*) LoopRerollPass.cpp:0:0
#9 0x0000000002a0fa8b llvm::LoopRerollPass::run(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (build-all/bin/opt+0x2a0fa8b)
#10 0x0000000002f891cd llvm::detail::PassModel<llvm::Loop, llvm::LoopRerollPass, 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
#11 0x000000000346894f llvm::Optional<llvm::PreservedAnalyses> llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::runSinglePass<llvm::Loop, std::unique_ptr<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, std::default_delete<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&> > > >(llvm::Loop&, std::unique_ptr<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>, std::default_delete<llvm::detail::PassConcept<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&> > >&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&, llvm::PassInstrumentation&) (build-all/bin/opt+0x346894f)
#12 0x0000000003468573 llvm::PassManager<llvm::Loop, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&>::runWithoutLoopNestPasses(llvm::Loop&, llvm::AnalysisManager<llvm::Loop, llvm::LoopStandardAnalysisResults&>&, llvm::LoopStandardAnalysisResults&, llvm::LPMUpdater&) (build-all/bin/opt+0x3468573)
#13 0x0000000003467c38 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&) (build-all/bin/opt+0x3467c38)
#14 0x0000000002f6c2ed 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 0x0000000003469c4b llvm::FunctionToLoopPassAdaptor::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x3469c4b)
#16 0x0000000002f8805d 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 0x00000000023e7805 llvm::PassManager<llvm::Function, llvm::AnalysisManager<llvm::Function> >::run(llvm::Function&, llvm::AnalysisManager<llvm::Function>&) (build-all/bin/opt+0x23e7805)
#18 0x0000000000b07a2d 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 0x00000000023ebc2a llvm::ModuleToFunctionPassAdaptor::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x23ebc2a)
#20 0x00000000007a429d 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 0x00000000023e6948 llvm::PassManager<llvm::Module, llvm::AnalysisManager<llvm::Module> >::run(llvm::Module&, llvm::AnalysisManager<llvm::Module>&) (build-all/bin/opt+0x23e6948)
#22 0x000000000079c032 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) (build-all/bin/opt+0x79c032)
#23 0x00000000007aed04 main (build-all/bin/opt+0x7aed04)
#24 0x00007fad61096555 __libc_start_main (/lib64/libc.so.6+0x22555)
#25 0x000000000079747c _start (build-all/bin/opt+0x79747c)
Abort
[bbi-64678.ll.gz](https://github.com/llvm/llvm-project/files/7846167/bbi-64678.ll.gz)
This is old, it starts crashing with old builds from sep 2020. Before that the -loop-reroll flag isn't recognized.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJztWltz2jgU_jXwogljfPcDD5Qms5lttkySzT4ysi2DtrLkleSk6a_vkc3FMiSQbTrbZsuAAeuc79w-HSzkVOSPE8buS5SJsqR64E2Rj303I27gxPHAeT9wptekkiKvM4IeqF6BSHsaiUqjMyZEdSaJFIyhM4EG7kVO7uHIaziRpvQs9MMoHjHWKm0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