[llvm] [VPlan] Consolidate logic for narrowToSingleScalars (NFC) (PR #167360)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 11 01:55:22 PST 2025
================
@@ -1418,7 +1394,9 @@ static void narrowToSingleScalarRecipes(VPlan &Plan) {
// 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.
- if (!vputils::isSingleScalar(RepOrWidenR) ||
+ if ((!vputils::isSingleScalar(RepOrWidenR) &&
+ !vputils::onlyFirstLaneUsed(RepOrWidenR)) ||
+ RepOrWidenR->getNumUsers() == 0 ||
----------------
artagnon wrote:
I think that it was less powerful before (just an optimization issue, not a correctness one), and the code we removed now was doing part of the job?
https://github.com/llvm/llvm-project/pull/167360
More information about the llvm-commits
mailing list