[PATCH] D21956: AVX-512: Optimization for patterns with i1 scalar type

Elena Demikhovsky via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 3 05:02:53 PDT 2016


delena created this revision.
delena added reviewers: RKSimon, igorb, qcolombet, craig.topper.
delena added a subscriber: llvm-commits.
delena set the repository for this revision to rL LLVM.

The patch removes redundant kmov instructions (not all, we still have a lot of work here) and redundant "and" instructions after "setcc".
I use "AssertZero" marker between X86ISD::SETCC node and "truncate" to eliminate extra "and $1" instruction.
I also changed zext, aext and trunc patterns in the .td file. It allows to remove extra "kmov" instruictions.

Fast ISEL mode is not supported correctly for AVX-512. ICMP/FCMP scalar instruction should return result in k-reg. It will be fixed in one of the next patches. I redirected handling of "cmp" to the DAG builder mode. (The code looks worse in one specific test case, but without this fix the new patch fails).

Repository:
  rL LLVM

http://reviews.llvm.org/D21956

Files:
  ../lib/Target/X86/X86FastISel.cpp
  ../lib/Target/X86/X86ISelLowering.cpp
  ../lib/Target/X86/X86InstrAVX512.td
  ../test/CodeGen/X86/avx512-cmp.ll
  ../test/CodeGen/X86/avx512-ext.ll
  ../test/CodeGen/X86/avx512-insert-extract.ll
  ../test/CodeGen/X86/avx512-intrinsics.ll
  ../test/CodeGen/X86/avx512-mask-op.ll
  ../test/CodeGen/X86/avx512dq-intrinsics.ll
  ../test/CodeGen/X86/masked_gather_scatter.ll
  ../test/CodeGen/X86/pr27591.ll
  ../test/CodeGen/X86/pr28173.ll
  ../test/CodeGen/X86/xaluo.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21956.62620.patch
Type: text/x-patch
Size: 50476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160703/0558efd3/attachment-0001.bin>


More information about the llvm-commits mailing list