<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 - PGO leads to performance degradation"
   href="https://bugs.llvm.org/show_bug.cgi?id=36303">36303</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>PGO leads to performance degradation
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>6.0
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>vleschuk@gmail.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=19840" name="attach_19840" title="Code sample">attachment 19840</a> <a href="attachment.cgi?id=19840&action=edit" title="Code sample">[details]</a></span>
Code sample

I've been testing PGO with the code from the thread:
<a href="http://lists.llvm.org/pipermail/llvm-dev/2016-May/099395.html">http://lists.llvm.org/pipermail/llvm-dev/2016-May/099395.html</a>

(Code is attached).

And it appeared that using PGO (either -fprofile-instr or -fprofile) lead to
performance degradation. See the results of `{ for i in `seq 1 100`; do time
./test > /dev/null ; done ; } 2>> perf.log` below:

clang -O3: 3.12253
clang -O3 + -fprofile-use: 3.14982
clang -O3 + -fprofile-use + -mllvm -force-precise-rotation-cost : 3.14189
gcc -O3: 3.38019
gcc -O3 + -fprofile-use: 2.937

clang/llvm were built from release_60 branch, gcc version was 7.3.0.</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>