<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 - Shrink wrapping rarely fires on platforms with no regparms (i686)"
   href="https://bugs.llvm.org/show_bug.cgi?id=34917">34917</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Shrink wrapping rarely fires on platforms with no regparms (i686)
          </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>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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>rnk@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Consider this program targetting i686-windows-msvc:

int doSomething(int*);
int /*__fastcall*/ shrink_wrap_basic(int a, int b, int c, int d) {
  if (a < b)
    return a;
  for (int i = c; i < d; ++i)
    doSomething(&c);
  return doSomething(&c);
}

We can shrink wrap here successfully so long as 'a' and 'b' are passed in
ECX/EDX, i.e. when __fastcall is uncommented.

Most functions are not marked fastcall, and parameters are passed on the stack.
Shrink wrapping checks for uses of CSRs and frame indices before the split
point. However, this check is too limiting. We can probably separate fixed
frame indices for arguments from fixed frame indices in the current function's
frame by checking the offset to ensure that it is in the caller's frame.</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>