[X86][SSE] Lower shuffle as ANY_EXTEND_VECTOR_INREG
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 10 Aug 2019 16:46:07 +0000 (16:46 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sat, 10 Aug 2019 16:46:07 +0000 (16:46 +0000)
commitec128709f0ad35282d2e009dd333b1d8ca434c80
treed2ec326b0d0c16ee441162b28980da493a2a3c2e
parent555f7495df1c466dcc3e759fe8b8eccd8ef94770
[X86][SSE] Lower shuffle as ANY_EXTEND_VECTOR_INREG

On SSE41+ targets we always lower vector shuffles to ZERO_EXTEND_VECTOR_INREG, even if we don't need the extended bits.

This patch relaxes this so that we lower to ANY_EXTEND_VECTOR_INREG if we can, meaning that shuffle combines have a better idea of what elements need to be kept zero. This helps the multiple reduction code as we can now combine away a lot more of the pack+extend codes.

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

llvm-svn: 368515
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/vector-idiv-udiv-128.ll
llvm/test/CodeGen/X86/vector-reduce-mul.ll
llvm/test/CodeGen/X86/vector-shuffle-256-v8.ll