[llvm-bugs] [Bug 41287] New: opt crashes with "opt -loop-extract-single -adce"

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Mar 28 19:04:12 PDT 2019


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

            Bug ID: 41287
           Summary: opt crashes with "opt -loop-extract-single -adce"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: cszide at 163.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 21694
  --> https://bugs.llvm.org/attachment.cgi?id=21694&action=edit
IR file of testcase

$clang -v
clang version 9.0.0 (trunk 355281)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm/build4/bin
Found candidate GCC installation: /usr/lib/gcc/i686-linux-gnu/8
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/5.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/6.5.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.3.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$opt -loop-extract-single -adce small.bc
Stack dump:
0.      Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build/bin/opt
-loop-extract-single -adce small.bc 
1.      Running pass 'Function Pass Manager' on module 'small.bc'.
2.      Running pass 'Aggressive Dead Code Elimination' on function '@d'
 #0 0x00005633b71d7b7b llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:494:0
 #1 0x00005633b71d7c0e PrintStackTraceSignalHandler(void*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:558:0
 #2 0x00005633b71d5b92 llvm::sys::RunSignalHandlers()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Signals.cpp:68:0
 #3 0x00005633b71d759d SignalHandler(int)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Support/Unix/Signals.inc:357:0
 #4 0x00007f1dfd7ce890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
 #5 0x00005633b6e39abb (anonymous
namespace)::AggressiveDeadCodeElimination::markLive(llvm::Instruction*)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ADCE.cpp:391:0
 #6 0x00005633b6e3992c (anonymous
namespace)::AggressiveDeadCodeElimination::markLiveInstructions()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ADCE.cpp:361:0
 #7 0x00005633b6e388de (anonymous
namespace)::AggressiveDeadCodeElimination::performDeadCodeElimination()
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ADCE.cpp:205:0
 #8 0x00005633b6e3b76c (anonymous
namespace)::ADCELegacyPass::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/Transforms/Scalar/ADCE.cpp:708:0
 #9 0x00005633b69581fc llvm::FPPassManager::runOnFunction(llvm::Function&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1643:0
#10 0x00005633b6958473 llvm::FPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1678:0
#11 0x00005633b6958844 (anonymous
namespace)::MPPassManager::runOnModule(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1743:0
#12 0x00005633b6958fd3 llvm::legacy::PassManagerImpl::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1856:0
#13 0x00005633b69591c5 llvm::legacy::PassManager::run(llvm::Module&)
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/lib/IR/LegacyPassManager.cpp:1888:0
#14 0x00005633b4bb615f main
/home/jack-zhou/Documents/llvm/llvm_truck/llvm/tools/opt/opt.cpp:862:0
#15 0x00007f1dfc463b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#16 0x00005633b4b77cba _start
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm/build2/bin/opt+0x1808cba)
Segmentation fault (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/20190329/cc550c1a/attachment.html>


More information about the llvm-bugs mailing list