[SLP]Fix emission of the masks in shuffles for undefs.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 6 Apr 2023 13:03:03 +0000 (06:03 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 6 Apr 2023 17:16:58 +0000 (10:16 -0700)
commit50af6ab0ab55829f332d304794b8198fa73e94f7
tree457e58e32dc0d1cdd2e415ebf08f0b1d34617562
parentf27b77e5c59a1a907fa45eeb5f2e279a5c8bd17d
[SLP]Fix emission of the masks in shuffles for undefs.

If the value is used in the expression, need to adjust the mask before
applying the mask. Plus, need to fix the analysis of the phi nodes for
reused scalars.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/crash_lencod.ll
llvm/test/Transforms/SLPVectorizer/X86/remark_extract_broadcast.ll