[llvm-bugs] [Bug 32722] New: Reg alloc reloads register three times in innermost vector loop, although there are many free regs

via llvm-bugs llvm-bugs at lists.llvm.org
Thu Apr 20 09:44:34 PDT 2017


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

            Bug ID: 32722
           Summary: Reg alloc reloads register three times in innermost
                    vector loop, although there are many free regs
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Register Allocator
          Assignee: unassignedbugs at nondot.org
          Reporter: paulsson at linux.vnet.ibm.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 18320
  --> https://bugs.llvm.org/attachment.cgi?id=18320&action=edit
reduced test case

I noticed that there are reloads of a register which is used as an address
inside a vectorized loop.

The loop is innermost, is a single block, and there are 10 unused registers in
the loop.

I am thinking that RA should be able to split live ranges around the loop?

bin/llc -O3 -mtriple=s390x-linux-gnu -mcpu=z13 -o out.s vecloopspills.ll


.LBB0_18:                               # %vector.body
                                        # =>This Inner Loop Header: Depth=1
        lgfr    %r5, %r3
        sllg    %r5, %r5, 3
        vlrepg  %v0, 0(%r5,%r14)
        ahik    %r14, %r3, -2
        lg      %r13, 200(%r15)         # 8-byte Folded Reload
        lgfr    %r14, %r14
        sllg    %r14, %r14, 3
        vlrepg  %v1, 0(%r14,%r13)
        vmrhg   %v0, %v1, %v0
        lg      %r13, 200(%r15)         # 8-byte Folded Reload
        vflcdb  %v0, %v0
        vsteg   %v0, 0(%r14,%r13), 0
        lg      %r14, 200(%r15)         # 8-byte Folded Reload
        ahi     %r3, 4
        aghi    %r4, -2
        vsteg   %v0, 0(%r5,%r14), 1
        jne     .LBB0_18

-- 
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/20170420/d8914875/attachment-0001.html>


More information about the llvm-bugs mailing list