[X86] Stop promoting integer loads to vXi64
authorCraig Topper <craig.topper@intel.com>
Sun, 21 Oct 2018 21:30:26 +0000 (21:30 +0000)
committerCraig Topper <craig.topper@intel.com>
Sun, 21 Oct 2018 21:30:26 +0000 (21:30 +0000)
commit321df5b0d43bccdd595297d0fc7b7c0dbf471cda
tree68f1fe74d07e95f4c108815d81c55511d5851519
parentcea5db8302251e945dd576c9c6230c269fab6f33
[X86] Stop promoting integer loads to vXi64

Summary:
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.

Reviewers: RKSimon, spatel

Reviewed By: RKSimon

Subscribers: llvm-commits, RKSimon

Differential Revision: https://reviews.llvm.org/D53306

llvm-svn: 344877
15 files changed:
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/lib/Target/X86/X86InstrAVX512.td
llvm/lib/Target/X86/X86InstrFragmentsSIMD.td
llvm/lib/Target/X86/X86InstrSSE.td
llvm/lib/Target/X86/X86InstrXOP.td
llvm/lib/Target/X86/X86MCInstLower.cpp
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp
llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h
llvm/test/CodeGen/X86/avx-vperm2x128.ll
llvm/test/CodeGen/X86/oddshuffles.ll
llvm/test/CodeGen/X86/pshufb-mask-comments.ll
llvm/test/CodeGen/X86/vector-extend-inreg.ll
llvm/test/CodeGen/X86/vector-idiv-v2i32.ll
llvm/test/CodeGen/X86/widened-broadcast.ll