[SLP]Do not create unused gather nodes for scalar arguments of vector intrinsics.
authorAlexey Bataev <a.bataev@outlook.com>
Fri, 12 Nov 2021 21:34:32 +0000 (13:34 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 15 Nov 2021 14:11:19 +0000 (06:11 -0800)
commit6fb5bed7d16bffc8549db0523323b182dd43fe4e
treef243357b5ca22acf4e8172569ef0ac482d7151d8
parent00ff774fca787af4fecbcab6d7ee5f454127c8a1
[SLP]Do not create unused gather nodes for scalar arguments of vector intrinsics.

If the vector intrinsic has scalar argument, we currently still create
a tree entry for this argument. This entry is not used, just consumes
resources and increases the cost of the tree.

Differential Revision: https://reviews.llvm.org/D113806
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/intrinsic_with_scalar_param.ll