llvm-project/llvm/lib/Target/X86/MCTargetDesc
Craig Topper 202b453a8a [AVX-512] Add support for commuting VPTERNLOG instructions.
VPTERNLOG is a ternary instruction with an immediate specifying the logical operation to perform. For each bit position in the 3 source vectors the bit from each source is concatenated together and the resulting 3-bit value is used to select a bit in the immediate. This bit value is written to the result vector.

We can commute this by swapping operands and modifying the immediate. To modify the immediate we need to swap two pairs of bits. The pairs correspond to the locations in the immediate where the commuted operands bits have opposite values and the uncommuted operand has the same value. Bits 0 and 7 will never be swapped since the relevant bits from all sources are the same value.

This refactors and reuses parts of the FMA3 commuting code which is also a three operand instruction.

llvm-svn: 282132
2016-09-22 03:00:50 +00:00
..
CMakeLists.txt Delete MCRelocationInfo::createExprForRelocation. 2016-01-15 02:24:12 +00:00
LLVMBuild.txt
X86AsmBackend.cpp X86: loosen an overly aggressive MachO assertion 2016-09-20 17:05:04 +00:00
X86BaseInfo.h [AVX-512] Add support for commuting VPTERNLOG instructions. 2016-09-22 03:00:50 +00:00
X86ELFObjectWriter.cpp Add initial support for R_386_GOT32X. 2016-07-06 21:19:11 +00:00
X86FixupKinds.h Add initial support for R_386_GOT32X. 2016-07-06 21:19:11 +00:00
X86MCAsmInfo.cpp Move RelaxELFRel out to llvm-mc. 2016-05-29 01:11:00 +00:00
X86MCAsmInfo.h Revert r247692: Replace Triple with a new TargetTuple in MCTargetDesc/* and related. NFC. 2015-09-15 16:17:27 +00:00
X86MCCodeEmitter.cpp [X86] Rename predicate function that detects if requires one of the REX.B, REX.X or REX.R bits. It's old name conflicted with a function in X8II namespace that doesnt' quite do the same thing. NFC 2016-08-27 17:13:43 +00:00
X86MCTargetDesc.cpp Delete MCCodeGenInfo. 2016-06-30 18:25:11 +00:00
X86MCTargetDesc.h MC] Provide an MCTargetOptions to implementors of MCAsmBackendCtorTy, NFC 2016-07-25 17:18:28 +00:00
X86MachObjectWriter.cpp Add initial support for R_386_GOT32X. 2016-07-06 21:19:11 +00:00
X86WinCOFFObjectWriter.cpp Don't crash trying to relax 32 loads on COFF. 2016-07-07 14:00:07 +00:00
X86WinCOFFStreamer.cpp [MC, COFF] Support link /incremental conditionally 2015-12-21 22:09:27 +00:00