<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 - more compact sequence of x86 movs generated when using -g"
   href="https://bugs.llvm.org/show_bug.cgi?id=40969">40969</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>more compact sequence of x86 movs generated when using -g
          </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>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>37728
          </td>
        </tr></table>
      <p>
        <div>
        <pre>In response to this llvm-dev post:
<a href="http://lists.llvm.org/pipermail/llvm-dev/2019-March/130779.html">http://lists.llvm.org/pipermail/llvm-dev/2019-March/130779.html</a>

Here is an example using the check-cfc tool (
<a href="https://github.com/llvm/llvm-project/tree/master/clang/utils/check_cfc">https://github.com/llvm/llvm-project/tree/master/clang/utils/check_cfc</a> ) to
spot a codegen difference depending on whether -g is specified or not.  The
reduced source example is a little bit nasty as there's some dodgy looking
pointer casting in there, but regardless the absence or presence of -g should
not make a difference to generated code.

Here's my check_cfc.cfg file contents:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Checks]
dash_g_no_change = true
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

and here it is in action:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
$ clang -v
Check CFC, checking: dash_g_no_change
clang version 9.0.0 (trunk 355410) (llvm/trunk 355412)
Target: x86_64-scei-ps4
Thread model: posix
InstalledDir: E:\work\upstream-llvm\build-vs2015-ps4-ninja\bin

$ cat 1.cpp

using alpha = float __attribute__((ext_vector_type(4)));

void bravo(alpha charlie) {
  unsigned char *delta = (unsigned char *)&charlie;
  delta[0] = 0;
  volatile alpha echo = charlie;
}

$ clang -c 1.cpp -O2 -g -fno-strict-aliasing --target=x86_64-unknown-unknown
Check CFC, checking: dash_g_no_change
1.cpp Code difference detected with -g
--- c:\tmp\gnochange\example\tmp\tmp_v5akp.o

+++ c:\tmp\gnochange\example\tmp\tmpvhabwu.o

@@ -5,6 +5,6 @@

 0x00000001: 48 89 E5                mov      rbp,rsp
 0x00000004: 0F 29 45 F0             movaps   xmmword ptr [rbp-10h],xmm0
 0x00000008: C6 45 F0 00             mov      byte ptr [rbp-10h],0
-0x0000000C: 0F 28 45 F0             movaps   xmm0,xmmword ptr [rbp-10h]
-0x00000010: 0F 29 45 E0             movaps   xmmword ptr [rbp-20h],xmm0
-0x00000014: 5D                      pop      rbp
+0x0000000C: 8A 45 F0                mov      al,byte ptr [rbp-10h]
+0x0000000F: 88 45 E0                mov      byte ptr [rbp-20h],al
+0x00000012: 48 8B 45 F1             mov      rax,qword ptr [rbp-0Fh]
*** Diff truncated ***
~~~~~~~~~~~~~~~~~~~~~~~~~~~~</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] Make llvm passes debug info invariant"
   href="https://bugs.llvm.org/show_bug.cgi?id=37728">Bug 37728</a>] [meta] Make llvm passes debug info invariant
              </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>