[X86][AVX] Reuse existing VBROADCAST(x) for SCALAR_TO_VECTOR(x)
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 28 Feb 2021 11:37:27 +0000 (11:37 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Sun, 28 Feb 2021 11:37:27 +0000 (11:37 +0000)
commitab3ea27b6fce6e57301c3e6efc96f80b5eb31ac4
tree6e9ed75797bf586900019bc10cd4d31e3ce09b11
parent0fe64812d86ca387115d5b25eb24bfb2287c3b8a
[X86][AVX] Reuse existing VBROADCAST(x) for SCALAR_TO_VECTOR(x)

Similar to what we already do for BROADCASTs of different vector sizes - if we're going to broadcast it anyway might as well reuse it.
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/combine-bitselect.ll