[LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends.
authorFlorian Hahn <flo@fhahn.com>
Mon, 22 Feb 2021 19:44:47 +0000 (19:44 +0000)
committerFlorian Hahn <flo@fhahn.com>
Tue, 23 Feb 2021 16:52:03 +0000 (16:52 +0000)
commit4efa097eb4c87d7ffe09a95a5b4ff372bdddda85
treea464ffb82b1290a3ff9c50c98720caf8b2dc2d59
parent52bc2e7577f338704438e18c95dea756657eca21
[LV] Allow tryToCreateWidenRecipe to return a VPValue, use for blends.

Generalize the return value of tryToCreateWidenRecipe to return either a
newly create recipe or an existing VPValue. Use this to avoid creating
unnecessary VPBlendRecipes.

Fixes PR44800.
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/lib/Transforms/Vectorize/VPRecipeBuilder.h
llvm/test/Transforms/LoopVectorize/single-value-blend-phis.ll