]> granicus.if.org Git - llvm/commit
This is a large patch for X86 AVX-512 of an optimization for reducing code size by...
authorGadi Haber <gadi.haber@intel.com>
Wed, 28 Dec 2016 10:12:48 +0000 (10:12 +0000)
committerGadi Haber <gadi.haber@intel.com>
Wed, 28 Dec 2016 10:12:48 +0000 (10:12 +0000)
commitb3ccb4ea783bfbc1df5e40ec729ff37a4b304d54
tree1e395dbfa928f4150040e5844e78732fb4dd3ce7
parenta167bbac7ff898931e351efb315b8fe7346a64be
This is a large patch for X86 AVX-512 of an optimization for reducing code size by encoding EVEX AVX-512 instructions using the shorter VEX encoding when possible.

There are cases of AVX-512 instructions that have two possible encodings. This is the case with instructions that use vector registers with low indexes of 0 - 15 and do not use the zmm registers or the mask k registers.
The EVEX encoding prefix requires 4 bytes whereas the VEX prefix can take only up to 3 bytes. Consequently, using the VEX encoding for these instructions results in a code size reduction of ~2 bytes even though it is compiled with the AVX-512 features enabled.

Reviewers: Craig Topper, Zvi Rackoover, Elena Demikhovsky
Differential Revision: https://reviews.llvm.org/D27901

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290663 91177308-0d34-0410-b5e6-96231b3b80d8
71 files changed:
include/llvm/CodeGen/MachineInstr.h
include/llvm/MC/MCStreamer.h
lib/MC/MCAsmStreamer.cpp
lib/Target/X86/CMakeLists.txt
lib/Target/X86/InstPrinter/X86InstComments.h
lib/Target/X86/X86.h
lib/Target/X86/X86EvexToVex.cpp [new file with mode: 0755]
lib/Target/X86/X86InstrTablesInfo.h [new file with mode: 0755]
lib/Target/X86/X86MCInstLower.cpp
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/avx-intrinsics-x86.ll
test/CodeGen/X86/avx2-intrinsics-x86.ll
test/CodeGen/X86/avx2-vbroadcast.ll
test/CodeGen/X86/avx512-arith.ll
test/CodeGen/X86/avx512-cvt.ll
test/CodeGen/X86/avx512-ext.ll
test/CodeGen/X86/avx512-gather-scatter-intrin.ll
test/CodeGen/X86/avx512-mask-op.ll
test/CodeGen/X86/avx512-masked_memop-16-8.ll
test/CodeGen/X86/avx512-mov.ll
test/CodeGen/X86/avx512-scalar.ll
test/CodeGen/X86/avx512-vbroadcasti128.ll
test/CodeGen/X86/avx512-vbroadcasti256.ll
test/CodeGen/X86/avx512-vec-cmp.ll
test/CodeGen/X86/avx512bwvl-intrinsics-upgrade.ll
test/CodeGen/X86/avx512bwvl-intrinsics.ll
test/CodeGen/X86/avx512bwvl-mov.ll
test/CodeGen/X86/avx512dqvl-intrinsics-upgrade.ll
test/CodeGen/X86/avx512dqvl-intrinsics.ll
test/CodeGen/X86/avx512ifmavl-intrinsics.ll
test/CodeGen/X86/avx512vbmivl-intrinsics.ll
test/CodeGen/X86/avx512vl-intrinsics-upgrade.ll
test/CodeGen/X86/avx512vl-intrinsics.ll
test/CodeGen/X86/avx512vl-logic.ll
test/CodeGen/X86/avx512vl-mov.ll
test/CodeGen/X86/avx512vl-nontemporal.ll
test/CodeGen/X86/avx512vl-vbroadcast.ll
test/CodeGen/X86/compress_expand.ll
test/CodeGen/X86/evex-to-vex-compress.mir [new file with mode: 0755]
test/CodeGen/X86/fast-isel-store.ll
test/CodeGen/X86/fp-logic-replace.ll
test/CodeGen/X86/masked_gather_scatter.ll
test/CodeGen/X86/masked_memop.ll
test/CodeGen/X86/nontemporal-2.ll
test/CodeGen/X86/sse-intrinsics-x86.ll
test/CodeGen/X86/sse2-intrinsics-x86.ll
test/CodeGen/X86/sse41-intrinsics-x86.ll
test/CodeGen/X86/sse42-intrinsics-x86.ll
test/CodeGen/X86/ssse3-intrinsics-x86.ll
test/CodeGen/X86/subvector-broadcast.ll
test/CodeGen/X86/vec-copysign-avx512.ll
test/CodeGen/X86/vec_fabs.ll
test/CodeGen/X86/vec_fp_to_int.ll
test/CodeGen/X86/vec_fpext.ll
test/CodeGen/X86/vec_int_to_fp.ll
test/CodeGen/X86/vector-half-conversions.ll
test/CodeGen/X86/vector-lzcnt-256.ll
test/CodeGen/X86/vector-shuffle-128-v16.ll
test/CodeGen/X86/vector-shuffle-128-v2.ll
test/CodeGen/X86/vector-shuffle-128-v4.ll
test/CodeGen/X86/vector-shuffle-128-v8.ll
test/CodeGen/X86/vector-shuffle-256-v16.ll
test/CodeGen/X86/vector-shuffle-256-v32.ll
test/CodeGen/X86/vector-shuffle-256-v8.ll
test/CodeGen/X86/vector-shuffle-combining-avx512bwvl.ll
test/CodeGen/X86/vector-shuffle-combining-avx512vbmi.ll
test/CodeGen/X86/vector-shuffle-masked.ll
test/CodeGen/X86/vector-trunc.ll
test/CodeGen/X86/vector-tzcnt-128.ll
test/CodeGen/X86/vector-tzcnt-256.ll
test/CodeGen/X86/viabs.ll