<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 - -memdep -loop-deletion -gvn"
   href="https://bugs.llvm.org/show_bug.cgi?id=41105">41105</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>-memdep -loop-deletion -gvn
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>7.0
          </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>Scalar Optimizations
          </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=21616" name="attach_21616" title=".bc file of the source code">attachment 21616</a> <a href="attachment.cgi?id=21616&action=edit" title=".bc file of the source code">[details]</a></span>
.bc file of the source code

$clang -v
clang version 7.0.1 (tags/RELEASE_701/final)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir:
/home/jack-zhou/clang+llvm-7.0.1-x86_64-linux-gnu-ubuntu-18.04/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 -version
LLVM (<a href="http://llvm.org/">http://llvm.org/</a>):
  LLVM version 7.0.1
  Optimized build.
  Default target: x86_64-unknown-linux-gnu
  Host CPU: skylake

$clang -O3 -c -emit-llvm  -mllvm -disable-llvm-optzns small.c  -o small.bc

$opt -memdep -loop-deletion -gvn small.bc -o small-opt.bc
Stack dump:
0.      Program arguments: opt -memdep -loop-deletion -gvn small.bc -o
small-opt.bc 
1.      Running pass 'Function Pass Manager' on module 'small.bc'.
2.      Running pass 'Global Value Numbering' on function '@b'
LLVMSymbolizer: error reading file: No such file or directory
#0 0x0000000001bf8154 (opt+0x1bf8154)
#1 0x0000000001bf617e (opt+0x1bf617e)
#2 0x0000000001bf8312 (opt+0x1bf8312)
#3 0x00007fb1591d9890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#4 0x00000000012549ac (opt+0x12549ac)
#5 0x00000000012a5b1d (opt+0x12a5b1d)
#6 0x000000000139e7b1 (opt+0x139e7b1)
#7 0x0000000001218f1c (opt+0x1218f1c)
#8 0x000000000121c552 (opt+0x121c552)
#9 0x000000000121969e (opt+0x121969e)
#10 0x0000000001218d48 (opt+0x1218d48)
#11 0x0000000001203f3f (opt+0x1203f3f)
#12 0x00000000012eaef4 (opt+0x12eaef4)
#13 0x00000000012eaca0 (opt+0x12eaca0)
#14 0x00000000012ee659 (opt+0x12ee659)
#15 0x00000000012ed181 (opt+0x12ed181)
#16 0x00000000012ec66e (opt+0x12ec66e)
#17 0x0000000001a11347 (opt+0x1a11347)
#18 0x0000000001a1441a (opt+0x1a1441a)
#19 0x0000000001a159f9 (opt+0x1a159f9)
#20 0x0000000001a14c60 (opt+0x1a14c60)
#21 0x0000000001a0e8fb (opt+0x1a0e8fb)
#22 0x0000000001a17875 (opt+0x1a17875)
#23 0x0000000001757ff1 (opt+0x1757ff1)
#24 0x0000000001758223 (opt+0x1758223)
#25 0x000000000175876e (opt+0x175876e)
#26 0x00000000007afbf5 (opt+0x7afbf5)
#27 0x00007fb157c66b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#28 0x000000000079c5ba (opt+0x79c5ba)
Segmentation fault (core dumped)

-------------------------------------------------
a;
b() {
  int c;
  int *d;
  int *e = &d >= 0;
  for (;; ++a)
    if (*d)
      f((*e = c) >= d);
}</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>