forked from OSchip/llvm-project
202b453a8a
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 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
LLVMBuild.txt | ||
X86AsmBackend.cpp | ||
X86BaseInfo.h | ||
X86ELFObjectWriter.cpp | ||
X86FixupKinds.h | ||
X86MCAsmInfo.cpp | ||
X86MCAsmInfo.h | ||
X86MCCodeEmitter.cpp | ||
X86MCTargetDesc.cpp | ||
X86MCTargetDesc.h | ||
X86MachObjectWriter.cpp | ||
X86WinCOFFObjectWriter.cpp | ||
X86WinCOFFStreamer.cpp |