<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - llc crashes with Segmentation fault at all optimization levels caused by "Peephole Optimizations""
   href="https://bugs.llvm.org/show_bug.cgi?id=43635">43635</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>llc crashes with Segmentation fault at all optimization levels caused by "Peephole Optimizations"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Common Code Generator Code
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cszide@163.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=22646" name="attach_22646" title="VOLREND.bc">attachment 22646</a> <a href="attachment.cgi?id=22646&action=edit" title="VOLREND.bc">[details]</a></span>
VOLREND.bc

$clang -v
clang version 10.0.0 (trunk 373844)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/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.4.0
Found candidate GCC installation: /usr/lib/gcc/x86_64-linux-gnu/8
Selected GCC installation: /usr/lib/gcc/x86_64-linux-gnu/7.4.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Candidate multilib: x32;@mx32
Selected multilib: .;@m64

$opt -loop-vectorize -sroa -simplifycfg -reg2mem -gvn-hoist -instcombine -sroa
VOLREND.bc -o VOLREND-opt.bc

In the following step, llc will crash with/without optimization levels
(-O1/2/3).
$llc VOLREND-opt.bc
Stack dump:
0.      Program arguments:
/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc VOLREND-opt.bc 
1.      Running pass 'Function Pass Manager' on module 'VOLREND-opt.bc'.
2.      Running pass 'Peephole Optimizations' on function '@Trace_Ray'
  #0 0x0000558b68f7a6ca llvm::sys::PrintStackTrace(llvm::raw_ostream&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x26e66ca)
  #1 0x0000558b68f783a4 llvm::sys::RunSignalHandlers()
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x26e43a4)
  #2 0x0000558b68f784e2 SignalHandler(int)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x26e44e2)
  #3 0x00007ff50dc67890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
  #4 0x00007ff50c96f30e _int_malloc
/build/glibc-OTsEL5/glibc-2.27/malloc/malloc.c:3557:0
  #5 0x00007ff50c9720fc malloc
/build/glibc-OTsEL5/glibc-2.27/malloc/malloc.c:3058:0
  #6 0x0000558b68f1b868 llvm::SmallVectorBase::grow_pod(void*, unsigned long,
unsigned long)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x2687868)
  #7 0x0000558b685fb7e3
llvm::SmallVectorImpl<llvm::TargetInstrInfo::RegSubRegPair>::operator=(llvm::SmallVectorImpl<llvm::TargetInstrInfo::RegSubRegPair>
const&)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x1d677e3)
  #8 0x0000558b685fba45 getNewSource(llvm::MachineRegisterInfo*,
llvm::TargetInstrInfo const*, llvm::TargetInstrInfo::RegSubRegPair,
llvm::SmallDenseMap<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult, 4u,
llvm::DenseMapInfo<llvm::TargetInstrInfo::RegSubRegPair>,
llvm::detail::DenseMapPair<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult> > const&, bool)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x1d67a45)
  #9 0x0000558b685fbaf8 getNewSource(llvm::MachineRegisterInfo*,
llvm::TargetInstrInfo const*, llvm::TargetInstrInfo::RegSubRegPair,
llvm::SmallDenseMap<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult, 4u,
llvm::DenseMapInfo<llvm::TargetInstrInfo::RegSubRegPair>,
llvm::detail::DenseMapPair<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult> > const&, bool)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x1d67af8)
 #10 0x0000558b685fbaf8 getNewSource(llvm::MachineRegisterInfo*,
llvm::TargetInstrInfo const*, llvm::TargetInstrInfo::RegSubRegPair,
llvm::SmallDenseMap<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult, 4u,
llvm::DenseMapInfo<llvm::TargetInstrInfo::RegSubRegPair>,
llvm::detail::DenseMapPair<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult> > const&, bool)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x1d67af8)
...
...
...
#255 0x0000558b685fbaf8 getNewSource(llvm::MachineRegisterInfo*,
llvm::TargetInstrInfo const*, llvm::TargetInstrInfo::RegSubRegPair,
llvm::SmallDenseMap<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult, 4u,
llvm::DenseMapInfo<llvm::TargetInstrInfo::RegSubRegPair>,
llvm::detail::DenseMapPair<llvm::TargetInstrInfo::RegSubRegPair, (anonymous
namespace)::ValueTrackerResult> > const&, bool)
(/home/jack-zhou/Documents/llvm/llvm_truck/llvm2/build10/bin/llc+0x1d67af8)</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>