[X86] Change X86::PMULDQ/PMULUDQ opcodes to take vXi64 type as input instead of vXi32.
authorCraig Topper <craig.topper@intel.com>
Thu, 8 Mar 2018 08:02:52 +0000 (08:02 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 8 Mar 2018 08:02:52 +0000 (08:02 +0000)
commita406796f5f690da895015c4106a9289d88408c93
tree23ec944a7ebfe005996198aa42175b5d88812fae
parent0feb0b9059792596e8386d030fa3d0aed9527798
[X86] Change X86::PMULDQ/PMULUDQ opcodes to take vXi64 type as input instead of vXi32.

This instruction can be thought of as reading either the even elements of a vXi32 input or the lower half of each element of a vXi64 input. We currently use the vXi32 interpretation, but vXi64 matches better with its broadcast behavior in EVEX.

I'm looking at moving MULDQ/MULUDQ creation to a DAG combine so we can do it when AVX512DQ is enabled without having to go through Custom lowering. But in some of the test cases we failed to use a broadcast load due to the size difference. This should help with that.

I'm also wondering if we can model these instructions in native IR and remove the intrinsics and I think using a vXi64 type will work better with that.

llvm-svn: 326991
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/X86IntrinsicsInfo.h
llvm/test/CodeGen/X86/vector-idiv-sdiv-128.ll
llvm/test/CodeGen/X86/vector-idiv-udiv-128.ll
llvm/test/CodeGen/X86/vector-idiv.ll
llvm/test/CodeGen/X86/vector-mul.ll
llvm/test/CodeGen/X86/vselect-avx.ll