[VPlan] Helper to check if a recipe uses scalar values of op.
authorFlorian Hahn <flo@fhahn.com>
Fri, 11 Mar 2022 13:41:08 +0000 (13:41 +0000)
committerFlorian Hahn <flo@fhahn.com>
Fri, 11 Mar 2022 13:41:08 +0000 (13:41 +0000)
commitecea477df3c929d14aacca0581bc26ff3c83498c
treea97942cf027b19c0b2f755c8036d2a1ad500317e
parent7781f61efa1823faadf73819785b8b8acd288914
[VPlan] Helper to check if a recipe uses scalar values of op.

This patch adds a helper to check if a recipe only uses scalars of a
given operand. This is similar to onlyFirstLaneUsed, which was
introduced earlier.

By default, usesScalars falls back on onlyFirstLaneUsed.

Will be used by D120828.

Reviewed By: Ayal

Differential Revision: https://reviews.llvm.org/D120827
llvm/lib/Transforms/Vectorize/VPlan.h