[SLP]Fix a crash for the replaced vectorized value.
authorAlexey Bataev <a.bataev@outlook.com>
Thu, 27 Apr 2023 16:00:21 +0000 (09:00 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Thu, 27 Apr 2023 16:32:00 +0000 (09:32 -0700)
commitcf792f664a75ea2b45962e81ea4487fc44b00232
treecb054d0ba759fe72ec0fd9514bda7a6edcb4c08c
parent1e9f7079de597ad745a319aae589a6a48484327c
[SLP]Fix a crash for the replaced vectorized value.

If two nodes share the same value, which is replaced in one of the
nodes, need to automatically replace same value in all nodes. Btter to
use WeakTrackingVH for this to fix compiler crash.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/postponed_gathers.ll [new file with mode: 0644]