[PATCH] D38388: [DAGCombiner, x86] convert insertelement of bitcasted vector into shuffle

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 28 15:55:00 PDT 2017


spatel created this revision.
Herald added subscribers: kristof.beyls, mcrosier, aemerson.

This is a generalization of the IR fold in https://reviews.llvm.org/D38316 to handle insertion into a non-undef vector. If this looks ok, then we should probably just abandon that one.

I had to add a target hook to avoid AVX512 horror with vXi1 shuffles. I think ARM/AArch64 will want to enable this too based on the earlier discussion, but I'm not sure if that would be limited to certain types or just set it to true for everything.

There may be room for improvement in the shuffle lowering here, but I think that would be follow-up work.


https://reviews.llvm.org/D38388

Files:
  include/llvm/Target/TargetLowering.h
  lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  lib/Target/X86/X86ISelLowering.h
  test/CodeGen/X86/insertelement-shuffle.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38388.117069.patch
Type: text/x-patch
Size: 13058 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170928/cde832fc/attachment.bin>


More information about the llvm-commits mailing list