OSDN Git Service

[X86] Use X86ISD::VBROADCAST in place of v2f64 X86ISD::MOVDDUP when AVX2 is available
authorCraig Topper <craig.topper@intel.com>
Fri, 13 Oct 2017 21:56:48 +0000 (21:56 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 13 Oct 2017 21:56:48 +0000 (21:56 +0000)
commiteb7fbe2299795670534d4fd010136d7b3288c8d6
tree3abe1f6376d43ee616752534463116879ab58a12
parent3136f295f4849ffea62493bf6f1be68587a31493
[X86] Use X86ISD::VBROADCAST in place of v2f64 X86ISD::MOVDDUP when AVX2 is available

This is particularly important for AVX512VL where we are better able to recognize the VBROADCAST loads to fold with other operations.

For AVX512VL we now use X86ISD::VBROADCAST for all of the patterns and remove the 128-bit X86ISD::VMOVDDUP.

We may be able to use this for AVX1 as well which would allow us to remove more isel patterns.

I also had to add X86ISD::VBROADCAST as a node to call combineShuffle for so that we treat it similar to X86ISD::MOVDDUP.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315768 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86InstrAVX512.td
lib/Target/X86/X86InstrSSE.td
test/CodeGen/X86/avx512vl-vbroadcast.ll