[X86][AVX] Narrow VPBROADCASTQ->VPBROADCASTD if we don't need the upper bits.
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 23 Mar 2021 09:40:54 +0000 (09:40 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 23 Mar 2021 09:41:02 +0000 (09:41 +0000)
commit080cb83e52c3059a62bbb87142cbcf3f68c14ba2
tree8e9a3485faaef5a0453bdfec7b7f9eb04f41a002
parenteaee4f269645094f03f3aaff6b365176d63ab3e8
[X86][AVX] Narrow VPBROADCASTQ->VPBROADCASTD if we don't need the upper bits.

Helps fix cases where we've splatted smaller types to a wider vector element type without needing the upper bits.

Avoid this on AVX512 targets as that can affect broadcast folding.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/bitcast-int-to-vector-bool-sext.ll
llvm/test/CodeGen/X86/bitcast-int-to-vector-bool-zext.ll