[llvm] [VPlan] Skip uses-scalars restriction if one of ops needs broadcast. (PR #168246)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 24 03:00:23 PST 2025
================
@@ -1425,32 +1425,33 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
continue;
}
- // Skip recipes that aren't single scalars or don't have only their
- // scalar results used. In the latter case, we would introduce extra
- // broadcasts.
+ // Skip recipes that aren't single scalars or when conversion to
+ // single-scalar does not introduce additional broadcasts. That is, either
+ // only the scalars of the recipe are used, or at least one of the
+ // operands would require a broadcast. In the latter case, the
+ // single-scalar may need to be broadcasted, but another broadcast is
+ // removed. scalar results used. In the latter case, we would introduce
+ // extra broadcasts.
if (!vputils::isSingleScalar(RepOrWidenR) ||
----------------
fhahn wrote:
done thanks
https://github.com/llvm/llvm-project/pull/168246
More information about the llvm-commits
mailing list