[llvm-bugs] [Bug 50296] New: opt -enable-new-pm=0 -enable-loop-distribute -O1 crashes with Assertion `Ptr != End && "dereferencing end() iterator"' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 11 01:32:17 PDT 2021


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

            Bug ID: 50296
           Summary: opt -enable-new-pm=0 -enable-loop-distribute -O1
                    crashes with Assertion `Ptr != End && "dereferencing
                    end() iterator"' 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 24848
  --> https://bugs.llvm.org/attachment.cgi?id=24848&action=edit
bbi-55997_2.ll reproducer

Reproduce with
 opt -o /dev/null bbi-55997_2.ll -enable-new-pm=0 -enable-loop-distribute -O1

Result:
opt: ../include/llvm/ADT/DenseMap.h:1239: llvm::DenseMapIterator::pointer
llvm::DenseMapIterator<llvm::PointerIntPair<llvm::Value *, 1, bool,
llvm::PointerLikeTypeTraits<llvm::Value *>,
llvm::PointerIntPairInfo<llvm::Value *, 1,
llvm::PointerLikeTypeTraits<llvm::Value *> > >, std::vector<unsigned int,
std::allocator<unsigned int> >,
llvm::DenseMapInfo<llvm::PointerIntPair<llvm::Value *, 1, bool,
llvm::PointerLikeTypeTraits<llvm::Value *>,
llvm::PointerIntPairInfo<llvm::Value *, 1,
llvm::PointerLikeTypeTraits<llvm::Value *> > > >,
llvm::detail::DenseMapPair<llvm::PointerIntPair<llvm::Value *, 1, bool,
llvm::PointerLikeTypeTraits<llvm::Value *>,
llvm::PointerIntPairInfo<llvm::Value *, 1,
llvm::PointerLikeTypeTraits<llvm::Value *> > >, std::vector<unsigned int,
std::allocator<unsigned int> > >, true>::operator->() const [KeyT =
llvm::PointerIntPair<llvm::Value *, 1, bool,
llvm::PointerLikeTypeTraits<llvm::Value *>,
llvm::PointerIntPairInfo<llvm::Value *, 1,
llvm::PointerLikeTypeTraits<llvm::Value *> > >, ValueT = std::vector<unsigned
int, std::allocator<unsigned int> >, KeyInfoT =
llvm::DenseMapInfo<llvm::PointerIntPair<llvm::Value *, 1, bool,
llvm::PointerLikeTypeTraits<llvm::Value *>,
llvm::PointerIntPairInfo<llvm::Value *, 1,
llvm::PointerLikeTypeTraits<llvm::Value *> > > >, Bucket =
llvm::detail::DenseMapPair<llvm::PointerIntPair<llvm::Value *, 1, bool,
llvm::PointerLikeTypeTraits<llvm::Value *>,
llvm::PointerIntPairInfo<llvm::Value *, 1,
llvm::PointerLikeTypeTraits<llvm::Value *> > >, std::vector<unsigned int,
std::allocator<unsigned int> > >, IsConst = true]: Assertion `Ptr != End &&
"dereferencing end() iterator"' failed.
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 -o
/dev/null bbi-55997_2.ll -enable-new-pm=0 -enable-loop-distribute -O1
1.      Running pass 'Function Pass Manager' on module 'bbi-55997_2.ll'.
2.      Running pass 'Loop Distribution' on function '@f'
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH
or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
../../master-github/llvm/build-all/bin/opt(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamEi+0x23)[0x29a37d3]
../../master-github/llvm/build-all/bin/opt(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x29a148e]
../../master-github/llvm/build-all/bin/opt[0x29a3b56]
/lib64/libpthread.so.0(+0xf630)[0x7fe47e5bc630]
/lib64/libc.so.6(gsignal+0x37)[0x7fe47bcef387]
/lib64/libc.so.6(abort+0x148)[0x7fe47bcf0a78]
/lib64/libc.so.6(+0x2f1a6)[0x7fe47bce81a6]
/lib64/libc.so.6(+0x2f252)[0x7fe47bce8252]
../../master-github/llvm/build-all/bin/opt(_ZNK4llvm16MemoryDepChecker24getInstructionsForAccessEPNS_5ValueEb+0x1a9)[0x19f81e9]
../../master-github/llvm/build-all/bin/opt[0x272c87c]
../../master-github/llvm/build-all/bin/opt[0x272a518]
../../master-github/llvm/build-all/bin/opt[0x27302b0]
../../master-github/llvm/build-all/bin/opt(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x47f)[0x21a0a3f]
../../master-github/llvm/build-all/bin/opt(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x38)[0x21a7398]
../../master-github/llvm/build-all/bin/opt(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x35d)[0x21a100d]
../../master-github/llvm/build-all/bin/opt(main+0x3153)[0x778573]
/lib64/libc.so.6(__libc_start_main+0xf5)[0x7fe47bcdb555]
../../master-github/llvm/build-all/bin/opt[0x763440]
Abort

It starts crashing with ed9df5bd2f50b
    [Passes] Run sinking/hoisting in SimplifyCFG earlier.

but I suspect that it's connected to 1ed7f8ede564c
    [LAA] Support pointer phis in loop by analyzing each incoming pointer.

(If I let bugpoint run on this crash I end up with the crash in
 https://bugs.llvm.org/show_bug.cgi?id=50288 )

-- 
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/20210511/f26d9f40/attachment-0001.html>


More information about the llvm-bugs mailing list