[X86][AVX] Only share broadcasts of different widths from the same SDValue of the...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Nov 2020 12:12:16 +0000 (12:12 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Thu, 19 Nov 2020 12:15:18 +0000 (12:15 +0000)
commit14ae02fb3397961bb5f99a0df60622375fc1976d
tree81d236aaf1b184da7d77e566f877b3b34eb65bda
parent1e2da3839cc3543629ecb847fd3aa34edb64b42a
[X86][AVX] Only share broadcasts of different widths from the same SDValue of the same SDNode (PR48215)

D57663 allowed us to reuse broadcasts of the same scalar value by extracting low subvectors from the widest type.

Unfortunately we weren't ensuring the broadcasts were from the same SDValue, just the same SDNode - which failed on multiple-value nodes like ISD::SDIVREM

FYI: I intend to request this be merged into the 11.x release branch.

Differential Revision: https://reviews.llvm.org/D91709
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pr48215.ll