[X86][SSE] combineScalarToVector - only reuse broadcasts for scalar_to_vector if...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 2 Jun 2021 21:05:14 +0000 (22:05 +0100)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Wed, 2 Jun 2021 21:05:40 +0000 (22:05 +0100)
commit9f5d783d467523d6218a63883b45192c8a875c96
treeb38d440f3fb089aabc221fefdd99e204b50a9b7e
parentdc10bf1a4ed0b34b27284b5260ce5c6cc132bd6f
[X86][SSE] combineScalarToVector - only reuse broadcasts for scalar_to_vector if the source operands scalar types match

We were hitting an issue when the scalar_to_vector source was being implicitly truncated (in this case to i8 to vXi1) but we were also using the i8 source in a broadcast to a vXi8 value.

Fixes PR50374
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/pr50374.ll [new file with mode: 0644]