<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 - HotColdSplitting: Miscompile in /SingleSource/Benchmarks/BenchmarkGame/recursive (arm64, -Os)"
   href="https://bugs.llvm.org/show_bug.cgi?id=39357">39357</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>HotColdSplitting: Miscompile in /SingleSource/Benchmarks/BenchmarkGame/recursive (arm64, -Os)
          </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>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>Interprocedural Optimizations
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>vsk@apple.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=21019" name="attach_21019" title="IR immediately before HotColdSplitting (-Os -g)">attachment 21019</a> <a href="attachment.cgi?id=21019&action=edit" title="IR immediately before HotColdSplitting (-Os -g)">[details]</a></span>
IR immediately before HotColdSplitting (-Os -g)

When compiled with -Os, this test produces the correct output on an arm64
device with a 1008KB stack size limit.

When -hot-cold-split=true is enabled, the test program overflows its stack.

Here's the relevant function:

int ack(int x, int y) {
  if (x == 0) {
    return y + 1;
  }

  return ack(x - 1, ((y | 0) ? ack(x, y - 1) : 1));
}

I've attached the IR from immediately before HotColdSplitting and immediately
after. Even though none of the blocks in the ack() function should be
identified as cold, the hot path of the function is marked cold and outlined.</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>