[llvm-bugs] [Bug 36706] New: [X86] Could commute some VEX encoded instructions to enable 2 byte VEX prefix

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Mar 13 11:33:41 PDT 2018


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

            Bug ID: 36706
           Summary: [X86] Could commute some VEX encoded instructions to
                    enable 2 byte VEX prefix
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Backend: X86
          Assignee: unassignedbugs at nondot.org
          Reporter: craig.topper at gmail.com
                CC: llvm-bugs at lists.llvm.org

The VEX prefix comes in two forms, 2 byte and 3 byte. The 2 byte version is
missing some fields from the 3 byte version so can't encode all instructions.

The missing fields are VEX.W, VEX.mmmmm, VEX.X, and VEX.B. VEX.X is only used
by memory instructions. VEX.W isn't used on most instructions.

For a commutable instructions like the register only form of VPADDD, if one
input is xmm8-15 and the other is xmm0-7, we could take advantage of commuting
to always put the xmm8-15 in the operand that uses VEX.R to avoid needing
VEX.B.

This would only work for instructions that use VEX.mmmmm = 0x1, but that's the
more common encoding for that field.

-- 
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/20180313/b6c7b9db/attachment.html>


More information about the llvm-bugs mailing list