<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - [PPC] Suboptimal code generated for integer load followed by conversion to floating point"
   href="https://llvm.org/bugs/show_bug.cgi?id=27204">27204</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[PPC] Suboptimal code generated for integer load followed by conversion to floating point
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>amehsan@ca.ibm.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>This is going to be a bug after I commit this patch:
<a href="http://reviews.llvm.org/D18405">http://reviews.llvm.org/D18405</a>

I open it to make sure it won't be forgotten.

For this example:

float test (int *arr) {
  return arr[2];
}

After submission of the above patch we will generate the following code:

0:   08 00 80 38     li      r4,8
4:   98 20 03 7c     lxsiwax vs0,r3,r4
8:   e0 04 20 f0     xscvsxdsp vs1,vs0
c:   20 00 80 4e     blr

We need to generate the code below which has lower register pressure

0:   08 00 63 38     addi    r3,r3,8
4:   ae 1e 20 7c     lfiwax  f1,0,r3
8:   9c 0e 20 ec     fcfids  f1,f1
c:   20 00 80 4e     blr</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>