<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 - [X86][SSE] Improve constant pool loading to balance folding/broadcast/vzload"
   href="https://bugs.llvm.org/show_bug.cgi?id=46048">46048</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86][SSE] Improve constant pool loading to balance folding/broadcast/vzload
          </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>Backend: X86
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>craig.topper@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, spatel+llvm@rotateright.com
          </td>
        </tr>

        <tr>
          <th>See Also</th>
          <td>https://bugs.llvm.org/show_bug.cgi?id=30585
          </td>
        </tr></table>
      <p>
        <div>
        <pre>As Craig suggested on D80131:

<span class="quote">> Ideally we'd have a way to fold vzext_load ops inside
> X86InstrInfo::foldMemoryOperandCustom (by zero padding the constant pool
> entry where necessary) but I'm not certain how easy that is.</span >

I think the caller of foldMemoryOperandImpl is responsible for copying the
memoperand over to the new instruction. So changing the memory reference out
from under it will break that at the very least. We'd also be deferring our
usual load folding to the peephole pass which isn't as quite strong as
SelectionDAG I think.

If the load is in a loop we potentialy unfold it in MachineLICM and hoist it
out of the loop. So maybe what we really want is a later constant pool
shrinking pass that runs after Machine LICM. We have a similar issue with
broadcasts from constant pool don't we? Lowing of build_vector favors forming
broadcasts of constants without knowing if we can fold.</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>