[X86] Teach lower512BitShuffle to try bitmask and bitblend before splitting v32i16...
authorCraig Topper <craig.topper@intel.com>
Thu, 2 Jul 2020 22:35:47 +0000 (15:35 -0700)
committerCraig Topper <craig.topper@intel.com>
Thu, 2 Jul 2020 22:35:48 +0000 (15:35 -0700)
commitacf6c94a3881859988c4cb62172e5bc08ece7f9a
tree570d70663781c04f45f7426864f203441494a987
parent37f98f6f4c85010c786591e1f6bcacdf1bfb2b25
[X86] Teach lower512BitShuffle to try bitmask and bitblend before splitting v32i16/v64i8 on av512f only targets.

We consider v32i16/v64i8 to be legal types on avx512f, but we
don't have most operations until avx512bw. But we can use
and/or/xor operations. So try those before splitting.

This is especially helpful since we turn some ands with constant
masks into shuffles in early DAG combines. So we should make sure
we recover those back to AND.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/avx512-mask-op.ll
llvm/test/CodeGen/X86/combine-sdiv.ll
llvm/test/CodeGen/X86/pr45443.ll
llvm/test/CodeGen/X86/vector-fshl-512.ll
llvm/test/CodeGen/X86/vector-fshr-512.ll
llvm/test/CodeGen/X86/vector-shuffle-512-v32.ll
llvm/test/CodeGen/X86/vector-shuffle-512-v64.ll
llvm/test/CodeGen/X86/vector-shuffle-avx512.ll