[PATCH] D53306: [X86] Stop promoting integer loads to vXi64

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 16:48:42 PDT 2018


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

Theoretically this was done to simplify the amount of isel patterns that were needed. But it also meant a substantial number of our isel patterns have to match an explicit bitcast. By making the vXi32/vXi16/vXi8 types legal for loads, DAG combiner should be able to change the load type to remove the bitcast.

I had to add some additional plain load instruction patterns and a few other special cases, but overall the isel table has reduced in size by ~12000 bytes. So it looks like this promotion was hurting us more than helping.

I still have one crash in vector-trunc.ll that I'm hoping @RKSimon can help with. It seems to relate to using getTargetConstantFromNode on a load that was shrunk due to an extract_subvector combine after the constant pool entry was created. So we end up decoding more mask elements than the load size.

I'm hoping this patch will simplify the number of patterns needed to remove the and/or/xor promotion.


https://reviews.llvm.org/D53306

Files:
  lib/Target/X86/X86ISelDAGToDAG.cpp
  lib/Target/X86/X86ISelLowering.cpp
  lib/Target/X86/X86InstrAVX512.td
  lib/Target/X86/X86InstrFragmentsSIMD.td
  lib/Target/X86/X86InstrSSE.td
  lib/Target/X86/X86InstrXOP.td
  test/CodeGen/X86/avx-vperm2x128.ll
  test/CodeGen/X86/oddshuffles.ll
  test/CodeGen/X86/pshufb-mask-comments.ll
  test/CodeGen/X86/vector-extend-inreg.ll
  test/CodeGen/X86/vector-idiv-v2i32.ll
  test/CodeGen/X86/widened-broadcast.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53306.169771.patch
Type: text/x-patch
Size: 163757 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181015/0161add2/attachment-0001.bin>


More information about the llvm-commits mailing list