<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] Improve pass FixupLEA, and enable it on btver2."
   href="https://bugs.llvm.org/show_bug.cgi?id=38225">38225</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[X86] Improve pass FixupLEA, and enable it on btver2.
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>andrea.dibiagio@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Three-operands LEA instructions are slow on btver2 too. So we should enable 
FixupLEAPass for btver2.

On Btver2, a LEA with a `Scale` != 1 is always slow.
We should teach the FixupLEAPass how to process those slow instructions too.
In particular - using the same notation in FixupLEAPass - we should
`processInstructionsForBtver()`. Currently, we only
`processInstructionsForSLM()`.

The core logic in method `processInstrForSlow3OpLEA()` is good for btver2.
The only Intel specific portion of that code is related to the call to helper
function `hasInefficientLEABaseReg()`.
We should slightly restructure that logic, so that it makes sense for AMD
processors too.

The bottom line is:
we should try to slightly restructure the code in FixupLEAPass, so that the
pass can be enable on more subtargets. It would definitely help improving the
codegen for btver2. I think it would also be beneficial to other AMD processors
which may suffer for the same problematic LEA.</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>