x86: Optimize EVEX vector load/store instructions
authorH.J. Lu <hjl.tools@gmail.com>
Mon, 18 Mar 2019 00:56:10 +0000 (08:56 +0800)
committerH.J. Lu <hjl.tools@gmail.com>
Mon, 18 Mar 2019 00:58:19 +0000 (08:58 +0800)
commit97ed31ae00ea83410f9daf61ece8a606044af365
tree9afcfdc297efe11f38e852d4c2509e6039a23390
parent7bc0961cfec1f138a3127e8f210909aa430c425f
x86: Optimize EVEX vector load/store instructions

When there is no write mask, we can encode lower 16 128-bit/256-bit
EVEX vector register load and store instructions as VEX vector register
load and store instructions with -O1.

gas/

PR gas/24348
* config/tc-i386.c (optimize_encoding): Encode 128-bit and
256-bit EVEX vector register load/store instructions as VEX
vector register load/store instructions for -O1.
* doc/c-i386.texi: Update -O1 documentation.
* testsuite/gas/i386/i386.exp: Run PR gas/24348 tests.
* testsuite/gas/i386/optimize-1.s: Add tests for EVEX vector
load/store instructions.
* testsuite/gas/i386/optimize-2.s: Likewise.
* testsuite/gas/i386/optimize-3.s: Likewise.
* testsuite/gas/i386/optimize-5.s: Likewise.
* testsuite/gas/i386/x86-64-optimize-2.s: Likewise.
* testsuite/gas/i386/x86-64-optimize-3.s: Likewise.
* testsuite/gas/i386/x86-64-optimize-4.s: Likewise.
* testsuite/gas/i386/x86-64-optimize-5.s: Likewise.
* testsuite/gas/i386/x86-64-optimize-6.s: Likewise.
* testsuite/gas/i386/optimize-1.d: Updated.
* testsuite/gas/i386/optimize-2.d: Likewise.
* testsuite/gas/i386/optimize-3.d: Likewise.
* testsuite/gas/i386/optimize-4.d: Likewise.
* testsuite/gas/i386/optimize-5.d: Likewise.
* testsuite/gas/i386/x86-64-optimize-2.d: Likewise.
* testsuite/gas/i386/x86-64-optimize-3.d: Likewise.
* testsuite/gas/i386/x86-64-optimize-4.d: Likewise.
* testsuite/gas/i386/x86-64-optimize-5.d: Likewise.
* testsuite/gas/i386/x86-64-optimize-6.d: Likewise.
* testsuite/gas/i386/optimize-7.d: New file.
* testsuite/gas/i386/optimize-7.s: Likewise.
* testsuite/gas/i386/x86-64-optimize-8.d: Likewise.
* testsuite/gas/i386/x86-64-optimize-8.s: Likewise.

opcodes/

PR gas/24348
* i386-opc.tbl: Add Optimize to vmovdqa32, vmovdqa64, vmovdqu8,
vmovdqu16, vmovdqu32 and vmovdqu64.
* i386-tbl.h: Regenerated.
32 files changed:
gas/ChangeLog
gas/config/tc-i386.c
gas/doc/c-i386.texi
gas/testsuite/gas/i386/i386.exp
gas/testsuite/gas/i386/optimize-1.d
gas/testsuite/gas/i386/optimize-1.s
gas/testsuite/gas/i386/optimize-1a.d
gas/testsuite/gas/i386/optimize-2.d
gas/testsuite/gas/i386/optimize-2.s
gas/testsuite/gas/i386/optimize-3.d
gas/testsuite/gas/i386/optimize-3.s
gas/testsuite/gas/i386/optimize-4.d
gas/testsuite/gas/i386/optimize-5.d
gas/testsuite/gas/i386/optimize-5.s
gas/testsuite/gas/i386/optimize-7.d [new file with mode: 0644]
gas/testsuite/gas/i386/optimize-7.s [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-optimize-2.d
gas/testsuite/gas/i386/x86-64-optimize-2.s
gas/testsuite/gas/i386/x86-64-optimize-2a.d
gas/testsuite/gas/i386/x86-64-optimize-3.d
gas/testsuite/gas/i386/x86-64-optimize-3.s
gas/testsuite/gas/i386/x86-64-optimize-4.d
gas/testsuite/gas/i386/x86-64-optimize-4.s
gas/testsuite/gas/i386/x86-64-optimize-5.d
gas/testsuite/gas/i386/x86-64-optimize-5.s
gas/testsuite/gas/i386/x86-64-optimize-6.d
gas/testsuite/gas/i386/x86-64-optimize-6.s
gas/testsuite/gas/i386/x86-64-optimize-8.d [new file with mode: 0644]
gas/testsuite/gas/i386/x86-64-optimize-8.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/i386-opc.tbl
opcodes/i386-tbl.h