[llvm-bugs] [Bug 43972] New: "opt -indvars -simple-loop-unswitch -indvars" crashing with Assertion `SE->DT.dominates(ENT.ExitingBlock, Latch) && "We should only have known counts for exiting blocks that dominate " "latch!"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Nov 11 23:04:38 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=43972

            Bug ID: 43972
           Summary: "opt -indvars -simple-loop-unswitch -indvars" crashing
                    with Assertion `SE->DT.dominates(ENT.ExitingBlock,
                    Latch) && "We should only have known counts for
                    exiting blocks that dominate " "latch!"' 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 22797
  --> https://bugs.llvm.org/attachment.cgi?id=22797&action=edit
bbi-35465.ll reproducer

opt -indvars -simple-loop-unswitch -indvars -S -o - bbi-35465.ll

crashes on trunk (43ff63477) with

opt: ../lib/Analysis/ScalarEvolution.cpp:6912: const llvm::SCEV
*llvm::ScalarEvolution::BackedgeTakenInfo::getExact(const llvm::Loop *,
llvm::ScalarEvolution *, llvm::SCEVUnionPredicate *) const: Assertion
`SE->DT.dominates(ENT.ExitingBlock, Latch) && "We should only have known counts
for exiting blocks that dominate " "latch!"' failed.
Stack dump:
0.  Program arguments: /data/repo/master/llvm/build-all-builtins/bin/opt
-indvars -simple-loop-unswitch -indvars -S -o - bbi-35465.ll 
1.  Running pass 'Function Pass Manager' on module 'bbi-35465.ll'.
2.  Running pass 'Loop Pass Manager' on function '@f'
3.  Running pass 'Induction Variable Simplification' on basic block '%for.cond'
 #0 0x0000000003e2e074 PrintStackTraceSignalHandler(void*)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3e2e074)
 #1 0x0000000003e2bd8e llvm::sys::RunSignalHandlers()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3e2bd8e)
 #2 0x0000000003e2e478 SignalHandler(int)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3e2e478)
 #3 0x00007f147b92f890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007f147a3d8e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007f147a3da801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007f147a3ca39a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007f147a3ca412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x0000000003141734
llvm::ScalarEvolution::BackedgeTakenInfo::getExact(llvm::Loop const*,
llvm::ScalarEvolution*, llvm::SCEVUnionPredicate*) const
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3141734)
 #9 0x0000000003b9822c (anonymous namespace)::IndVarSimplify::run(llvm::Loop*)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3b9822c)
#10 0x0000000003ba8177 (anonymous
namespace)::IndVarSimplifyLegacyPass::runOnLoop(llvm::Loop*,
llvm::LPPassManager&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3ba8177)
#11 0x0000000003096522 llvm::LPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x3096522)
#12 0x00000000036da703 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x36da703)
#13 0x00000000036da9e8 llvm::FPPassManager::runOnModule(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x36da9e8)
#14 0x00000000036db04d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x36db04d)
#15 0x0000000002069d5d main
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x2069d5d)
#16 0x00007f147a3bbb97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#17 0x000000000205202a _start
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x205202a)
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/20191112/e16d10b4/attachment.html>


More information about the llvm-bugs mailing list