[llvm-bugs] [Bug 45806] New: Erroneous (?) error "invalid output size for constraint '=Yz'" (AVX2)

via llvm-bugs llvm-bugs at lists.llvm.org
Tue May 5 11:06:56 PDT 2020


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

            Bug ID: 45806
           Summary: Erroneous (?) error "invalid output size for
                    constraint '=Yz'" (AVX2)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: nemo at self-evident.org
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Background: https://stackoverflow.com/q/61601902/

I am not certain whether this is a bug. However, this inline asm is accepted by
both GCC and ICC and produces the output I expect:

__m256i mask()
{
    __m256i result;
    __asm__ ("vpcmpeqd %%xmm0,%%xmm0,%%xmm0" : "=Yz" (result));
    return result;
}

What I want is to operate on a YMM register using an XMM operation with a VEX
prefix so that the high lane of the YMM register gets cleared. Inline asm is
the only way I have found to get any compiler to emit this.

But Clang rejects this code with an "invalid output size" error (live example:
https://gcc.godbolt.org/z/vnqQfR).

-- 
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/20200505/35e91617/attachment.html>


More information about the llvm-bugs mailing list