[PATCH] D57002: [X86] Change avx512 COMPRESS and EXPAND lowering to use a single masked node instead of expand/compress+select.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 21 01:24:14 PST 2019


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel.

For compress, a select node doesn't semantically reflect the behavior of the instruction. The mask would have holes in it, but the resulting write is to contiguous elements at the bottom of the vector.

Furthermore, as far as the compressing and expanding is concerned the behavior is depended on the mask. You can just have an expand/compress node that only reads the input vector. That node would have no meaning by itself.

This all only works because we pattern match the compress/expand+select back to the instruction. But conceivably an optimization of the select could break the pattern and leave something meaningless.

This patch modifies the expand and compress node to take the mask and passthru as additional inputs and gets rid of the select all together.


Repository:
  rL LLVM

https://reviews.llvm.org/D57002

Files:
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86InstrFragmentsSIMD.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57002.182752.patch
Type: text/x-patch
Size: 5416 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190121/4aa7af69/attachment.bin>


More information about the llvm-commits mailing list