[llvm-bugs] [Bug 27204] New: [PPC] Suboptimal code generated for integer load followed by conversion to floating point

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Apr 4 14:22:48 PDT 2016


https://llvm.org/bugs/show_bug.cgi?id=27204

            Bug ID: 27204
           Summary: [PPC] Suboptimal code generated for integer load
                    followed by conversion to floating point
           Product: new-bugs
           Version: trunk
          Hardware: Other
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: amehsan at ca.ibm.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

This is going to be a bug after I commit this patch:
http://reviews.llvm.org/D18405

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160404/d54ed9ff/attachment.html>


More information about the llvm-bugs mailing list