[llvm-bugs] [Bug 43438] New: opt -licm crashes with Assertion `MSSA->dominates(NewDef, FirstDef) && "Should have dominated the new access"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Sep 25 00:22:46 PDT 2019


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

            Bug ID: 43438
           Summary: opt -licm crashes with Assertion
                    `MSSA->dominates(NewDef, FirstDef) && "Should have
                    dominated the new access"' 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 22567
  --> https://bugs.llvm.org/attachment.cgi?id=22567&action=edit
reproducer

This crashes on current trunk: r372813

Reproduce with:
 opt -S -o - licm2.ll -licm

Result:

opt: ../lib/Analysis/MemorySSAUpdater.cpp:465: void
llvm::MemorySSAUpdater::fixupDefs(const SmallVectorImpl<llvm::WeakVH> &):
Assertion `MSSA->dominates(NewDef, FirstDef) && "Should have dominated the new
access"' failed.
Stack dump:
0.  Program arguments: /data/repo/master/llvm/build-all-builtins/bin/opt -S -o
- licm2.ll -licm 
1.  Running pass 'Function Pass Manager' on module 'licm2.ll'.
2.  Running pass 'Loop Pass Manager' on function '@main'
3.  Running pass 'Loop Invariant Code Motion' on basic block '%for.cond'
 #0 0x000000000243ce24 PrintStackTraceSignalHandler(void*)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x243ce24)
 #1 0x000000000243ab4e llvm::sys::RunSignalHandlers()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x243ab4e)
 #2 0x000000000243d228 SignalHandler(int)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x243d228)
 #3 0x00007fd26405a890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #4 0x00007fd262b03e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
 #5 0x00007fd262b05801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
 #6 0x00007fd262af539a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
 #7 0x00007fd262af5412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
 #8 0x00000000017c4e3c
llvm::MemorySSAUpdater::fixupDefs(llvm::SmallVectorImpl<llvm::WeakVH> const&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x17c4e3c)
 #9 0x00000000017c39f8 llvm::MemorySSAUpdater::insertDef(llvm::MemoryDef*,
bool) (/data/repo/master/llvm/build-all-builtins/bin/opt+0x17c39f8)
#10 0x000000000220da23 (anonymous
namespace)::LoopPromoter::doExtraRewritesBeforeFinalDeletion()
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x220da23)
#11 0x00000000024f9971
llvm::LoadAndStorePromoter::run(llvm::SmallVectorImpl<llvm::Instruction*>
const&) (/data/repo/master/llvm/build-all-builtins/bin/opt+0x24f9971)
#12 0x000000000220960a
llvm::promoteLoopAccessesToScalars(llvm::SmallSetVector<llvm::Value*, 8u>
const&, llvm::SmallVectorImpl<llvm::BasicBlock*>&,
llvm::SmallVectorImpl<llvm::Instruction*>&,
llvm::SmallVectorImpl<llvm::MemoryAccess*>&, llvm::PredIteratorCache&,
llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo const*,
llvm::Loop*, llvm::AliasSetTracker*, llvm::MemorySSAUpdater*,
llvm::ICFLoopSafetyInfo*, llvm::OptimizationRemarkEmitter*)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x220960a)
#13 0x00000000021ff4bb (anonymous
namespace)::LoopInvariantCodeMotion::runOnLoop(llvm::Loop*, llvm::AAResults*,
llvm::LoopInfo*, llvm::DominatorTree*, llvm::TargetLibraryInfo*,
llvm::TargetTransformInfo*, llvm::ScalarEvolution*, llvm::MemorySSA*,
llvm::OptimizationRemarkEmitter*, bool)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x21ff4bb)
#14 0x000000000220a089 (anonymous
namespace)::LegacyLICMPass::runOnLoop(llvm::Loop*, llvm::LPPassManager&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x220a089)
#15 0x000000000178e5e2 llvm::LPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x178e5e2)
#16 0x0000000001da9303 llvm::FPPassManager::runOnFunction(llvm::Function&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x1da9303)
#17 0x0000000001da9613 llvm::FPPassManager::runOnModule(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x1da9613)
#18 0x0000000001da9c7d llvm::legacy::PassManagerImpl::run(llvm::Module&)
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x1da9c7d)
#19 0x00000000007dac2d main
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x7dac2d)
#20 0x00007fd262ae6b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#21 0x00000000007bfd6a _start
(/data/repo/master/llvm/build-all-builtins/bin/opt+0x7bfd6a)
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/20190925/554151dc/attachment-0001.html>


More information about the llvm-bugs mailing list