[llvm-bugs] [Bug 43687] New: opt -loop-idiom crashing with opt: ../lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1986: ... Assertion ... "Unexpected exit edges."' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Oct 16 05:58:10 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43687
Bug ID: 43687
Summary: opt -loop-idiom crashing with opt:
../lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1986:
... Assertion ... "Unexpected exit edges."' failed.
Product: libraries
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Loop Optimizer
Assignee: unassignedbugs at nondot.org
Reporter: mikael.holmen at ericsson.com
CC: llvm-bugs at lists.llvm.org
Created attachment 22676
--> https://bugs.llvm.org/attachment.cgi?id=22676&action=edit
f21.ll reproducer
Reproduce with:
opt -S -o - f21.ll -loop-idiom
Result:
opt: ../lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1986: bool (anonymous
namespace)::LoopIdiomRecognize::recognizeBCmpLoopControlFlow(const (anonymous
namespace)::LoopIdiomRecognize::CmpOfLoads &, (anonymous
namespace)::LoopIdiomRecognize::CmpLoopStructure &) const: Assertion
`!is_contained(ExitBlocks, CmpLoop.HeaderBrEqualBB) && is_contained(ExitBlocks,
CmpLoop.HeaderBrUnequalBB) && !is_contained(ExitBlocks,
CmpLoop.LatchBrContinueBB) && is_contained(ExitBlocks, CmpLoop.LatchBrFinishBB)
&& "Unexpected exit edges."' failed.
Stack dump:
0. Program arguments: /data/repo/master/llvm/build-all-builtins/bin/opt -S -o
- f21.ll -loop-idiom
1. Running pass 'Function Pass Manager' on module 'f21.ll'.
2. Running pass 'Loop Pass Manager' on function '@main'
3. Running pass 'Recognize loop idioms' on basic block '%for.body1163.1'
#0 0x0000000003ebc1e4 PrintStackTraceSignalHandler(void*)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3ebc1e4)
#1 0x0000000003eb9f0e llvm::sys::RunSignalHandlers()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3eb9f0e)
#2 0x0000000003ebc5e8 SignalHandler(int)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3ebc5e8)
#3 0x00007fbae2f2f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00007fbae19d8e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#5 0x00007fbae19da801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#6 0x00007fbae19ca39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#7 0x00007fbae19ca412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#8 0x0000000003c91232 (anonymous
namespace)::LoopIdiomRecognize::detectBCmpIdiom(llvm::ICmpInst*&,
llvm::CmpInst*&, llvm::LoadInst*&, llvm::LoadInst*&, llvm::SCEV const*&,
llvm::SCEV const*&, llvm::SCEV const*&) const
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3c91232)
#9 0x0000000003c8c47c (anonymous
namespace)::LoopIdiomRecognize::recognizeBCmp()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3c8c47c)
#10 0x0000000003c859dc (anonymous
namespace)::LoopIdiomRecognize::runOnNoncountableLoop()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3c859dc)
#11 0x0000000003c827b7 (anonymous
namespace)::LoopIdiomRecognizeLegacyPass::runOnLoop(llvm::Loop*,
llvm::LPPassManager&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3c827b7)
#12 0x000000000315c2b2 llvm::LPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x315c2b2)
#13 0x0000000003792093 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3792093)
#14 0x0000000003792378 llvm::FPPassManager::runOnModule(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3792378)
#15 0x00000000037929dd llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x37929dd)
#16 0x00000000021506fd main
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x21506fd)
#17 0x00007fbae19bbb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#18 0x000000000213402a _start
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x213402a)
Abort (core dumped)
--
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/20191016/dc994dd5/attachment.html>
More information about the llvm-bugs
mailing list