<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 - [debugify] memcpyopt fail"
   href="https://bugs.llvm.org/show_bug.cgi?id=37967">37967</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[debugify] memcpyopt fail
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

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

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

        <tr>
          <th>OS</th>
          <td>Windows NT
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>greg.bedwell@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>37953
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20484" name="attach_20484" title="ll reproducer">attachment 20484</a> <a href="attachment.cgi?id=20484&action=edit" title="ll reproducer">[details]</a></span>
ll reproducer

$ clang -v
clang version 7.0.0 (trunk 335708) (llvm/trunk 335721)
Target: x86_64-pc-windows-msvc
Thread model: posix
InstalledDir: e:\work\upstream-llvm\build-vs2015-native-ninja\bin

$ cat memcpy_optimization.cpp
struct Foo {
  long f0;
  long f1;
} *a;

int bar(Foo, Foo, int&c, Foo) {
  c = bar(a[0], a[0], c, a[0]);
  return c;
}

$ clang -target x86_64-unknown-unknown memcpy_optimization.cpp -O0 -Xclang
-disable-O0-optnone -emit-llvm -S -o memcpyopt-input.ll

$ opt -debugify-each -disable-output -instcombine -memcpyopt memcpyopt-input.ll
WARNING: Missing line 1
WARNING: Missing line 2
WARNING: Missing line 7
WARNING: Missing line 8
WARNING: Missing line 9
WARNING: Missing line 10
WARNING: Missing line 11
WARNING: Missing line 12
WARNING: Missing line 13
WARNING: Missing line 14
WARNING: Missing line 15
WARNING: Missing line 16
WARNING: Missing line 19
WARNING: Missing line 21
WARNING: Missing line 23
WARNING: Missing line 24
WARNING: Missing line 26
WARNING: Missing line 28
WARNING: Missing line 29
WARNING: Missing line 30
WARNING: Missing line 32
WARNING: Missing line 34
WARNING: Missing line 39
WARNING: Missing line 47
WARNING: Missing line 48
WARNING: Missing variable 1
WARNING: Missing variable 2
CheckFunctionDebugify [Combine redundant instructions]: PASS
ERROR: Instruction with empty DebugLoc in function _Z3bar3FooS_RiS_ -- 
%tmpcast = bitcast i8* %1 to %struct.Foo*
CheckFunctionDebugify [MemCpy Optimization]: FAIL
CheckFunctionDebugify [Module Verifier]: PASS</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta] [debugify] fix -check-debugify failures"
   href="https://bugs.llvm.org/show_bug.cgi?id=37953">Bug 37953</a>] [meta] [debugify] fix -check-debugify failures
              </li>
          </ul>
        </div>
        <br>

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

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