[PATCH] D31056: [AVX-512] Handle kor/kand/kandn/kxor/kxnor/knot intrinsics at lowering time instead of isel

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 16 14:53:55 PDT 2017


craig.topper created this revision.

Currently we handle these intrinsics at isel with special patterns. But as they just map to normal logic operations, we should just handle them at lowering. This will expose them to DAG combine optimizations. Right now the kor-sequence test generates a bunch of regclass copies between GR16 and VK16 that the peephole optimizer and/or register coallescing are removing to keep everything in the mask domain. By handling the logic op intrinsics earlier, these copies become bitcasts in the DAG and get removed by DAG combine which seems more robust.

This should help enable my plan to stop copying between K registers and GR8/GR16. The peephole optimizer can't remove a chain of copies between K and GR32 with insert_subreg/extract_subreg present in the chain so the kor-sequence test break. But this patch should dodge the problem entirely.


https://reviews.llvm.org/D31056

Files:
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86IntrinsicsInfo.h
  test/CodeGen/X86/avx512-intrinsics.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31056.92063.patch
Type: text/x-patch
Size: 8519 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170316/522dc5ff/attachment.bin>


More information about the llvm-commits mailing list