[llvm-bugs] [Bug 46782] New: [X86] Vector call ABI handling does not count registers correctly for 256-bit vectors on SSE only target

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jul 20 10:49:41 PDT 2020


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

            Bug ID: 46782
           Summary: [X86] Vector call ABI handling does not count
                    registers correctly for 256-bit vectors on SSE only
                    target
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: craig.topper at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

The frontend code counts the number of used vector registers for vector call
handling. Once we've ran out of the registers allocated to vectorcall, the IR
generation changes. If the vector is larger than the 128 bit on an SSE target
or larger than 512 on an avx/avx2 target, then the number of registers used is
undercounted since those cases will be split by backend type legalization. This
can cause an llvm_unreachable to trigger in X86CallingConv.cpp. Or if asserts
are not enabled, a fatal error when creating physical register copies.

Example crash https://godbolt.org/z/TTT6nx

-- 
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/20200720/5e3855c4/attachment-0001.html>


More information about the llvm-bugs mailing list