[PATCH] D25652: [AVX-512] Add support for commuting VPERMT2(B/W/D/Q/PS/PD) to/from VPERMI2(B/W/D/Q/PS/PD).

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Sat Oct 15 22:47:14 PDT 2016


craig.topper created this revision.
craig.topper added reviewers: delena, igorb, RKSimon.
craig.topper added a subscriber: llvm-commits.

The index and one of the table operands can be swapped by changing the opcode to the other version. Neither of these operands are the one that can load from memory so this can't be used to increase memory folding opportunities.

We need to handle the unmasked forms and the kz forms. Since the load operand isn't being commuted we can commute the load and broadcast instructions too.

Preprocessor macros are used to reduce the number of lines in the switches, but may have sacrificed some readability.


https://reviews.llvm.org/D25652

Files:
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86InstrInfo.cpp
  test/CodeGen/X86/avx512-insert-extract.ll
  test/CodeGen/X86/avx512-mask-op.ll
  test/CodeGen/X86/merge-consecutive-loads-512.ll
  test/CodeGen/X86/vector-shuffle-512-v8.ll
  test/CodeGen/X86/vector-shuffle-combining-avx512bw.ll
  test/CodeGen/X86/vector-shuffle-v1.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25652.74784.patch
Type: text/x-patch
Size: 37510 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161016/31442577/attachment.bin>


More information about the llvm-commits mailing list