<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 - Different code generation [csmith generated code]"
   href="https://bugs.llvm.org/show_bug.cgi?id=41111">41111</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Different code generation [csmith generated code]
          </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>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>praveenvelliengiri@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>jdevlieghere@apple.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21620" name="attach_21620" title="Random code">attachment 21620</a> <a href="attachment.cgi?id=21620&action=edit" title="Random code">[details]</a></span>
Random code

Hi

The source file attached produce different codegen behaviour for X86_64 at
optimization levels -O2, -O3, -Os with -g enabled and disabled. 

Interesting note here is that disassembly of code at one -opt level vary a lot
from code generated at different -opt level.

I have attached the source file, code generated at -O2 with/without -g option.

Steps to reproduced in X86_64 linux.

clang++ -c -g -O2 -Wno-everything -I/headers/of/csmith source.cpp -o di

clang++ -c -O2 -Wno-everything -I/headers/of/csmith source.cpp -o nodi

objdump -d -j .text nodi > hide1
objdump -d -j .text di   > hide2

colordiff hide1 hide2 || diff hide1 hide2

As these are randomly generated, the reducing to these to minimum test case is
quite difficult. I'm working on that.

Anyone have thoughts on it? Please reply 
Thanks</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>