[llvm-bugs] [Bug 46343] New: opt -jump-threading crashing after 69bdfb075b2

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jun 16 02:07:34 PDT 2020


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

            Bug ID: 46343
           Summary: opt -jump-threading crashing after 69bdfb075b2
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 23619
  --> https://bugs.llvm.org/attachment.cgi?id=23619&action=edit
bbi-44193.ll reproducer

Reproduce with:
 opt -S -o - bbi-44193.ll -jump-threading

Result:
 PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: build-all-builtins/bin/opt -S -o - bbi-44193.ll
-jump-threading 
1.      Running pass 'Function Pass Manager' on module 'bbi-44193.ll'.
2.      Running pass 'Jump Threading' on function '@func_1'
build-all-builtins/bin/opt[0x44fa1a4]
build-all-builtins/bin/opt(_ZN4llvm3sys17RunSignalHandlersEv+0xee)[0x44f7cde]
build-all-builtins/bin/opt[0x44fa4bc]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12890)[0x7f5300879890]
build-all-builtins/bin/opt(_ZN4llvm11Instruction15eraseFromParentEv+0x36)[0x3d291c6]
build-all-builtins/bin/opt(_ZN4llvm42RecursivelyDeleteTriviallyDeadInstructionsERNS_15SmallVectorImplINS_14WeakTrackingVHEEEPKNS_17TargetLibraryInfoEPNS_16MemorySSAUpdaterE+0x377)[0x4578bc7]
build-all-builtins/bin/opt(_ZN4llvm52RecursivelyDeleteTriviallyDeadInstructionsPermissiveERNS_15SmallVectorImplINS_14WeakTrackingVHEEEPKNS_17TargetLibraryInfoEPNS_16MemorySSAUpdaterE+0x117)[0x4578257]
build-all-builtins/bin/opt(_ZN4llvm22ConstantFoldTerminatorEPNS_10BasicBlockEbPKNS_17TargetLibraryInfoEPNS_14DomTreeUpdaterE+0x1d5)[0x4576955]
build-all-builtins/bin/opt(_ZN4llvm17JumpThreadingPass12ProcessBlockEPNS_10BasicBlockE+0xebd)[0x425866d]
build-all-builtins/bin/opt(_ZN4llvm17JumpThreadingPass7runImplERNS_8FunctionEPNS_17TargetLibraryInfoEPNS_13LazyValueInfoEPNS_9AAResultsEPNS_14DomTreeUpdaterEbSt10unique_ptrINS_18BlockFrequencyInfoESt14default_deleteISC_EESB_INS_21BranchProbabilityInfoESD_ISG_EE+0x56b)[0x4256f3b]
build-all-builtins/bin/opt[0x4267543]
build-all-builtins/bin/opt(_ZN4llvm13FPPassManager13runOnFunctionERNS_8FunctionE+0x484)[0x3d5ba34]
build-all-builtins/bin/opt(_ZN4llvm13FPPassManager11runOnModuleERNS_6ModuleE+0x38)[0x3d5bd08]
build-all-builtins/bin/opt(_ZN4llvm6legacy15PassManagerImpl3runERNS_6ModuleE+0x51d)[0x3d5c35d]
build-all-builtins/bin/opt(main+0x2acb)[0x24df54b]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7f52ff305b97]
build-all-builtins/bin/opt(_start+0x2a)[0x24c902a]
Segmentation fault (core dumped)

This starts happening with commit 69bdfb075b2:
    [IR] Clean up dead instructions after simplifying a conditional branch

    Change BasicBlock::removePredecessor to optionally return a vector of
    instructions which might be dead. Use this in ConstantFoldTerminator to
    delete them if they are dead.

    Reapply with a bug fix: don't drop the "!KeepOneInputPHIs" argument when
    removePredecessor calls PHINode::removeIncomingValue.

    Differential Revision: https://reviews.llvm.org/D80206

-- 
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/20200616/ac15f323/attachment.html>


More information about the llvm-bugs mailing list