From 6df4b2851a2576a6113f1762ef4f54eb357cc699 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Wed, 11 Jun 2025 16:31:45 +0200 Subject: [PATCH] [VPlan] Remove VPPredInstPHIRecipe::useScalars It uses the vector value of its operand if possible. Use the default definition in VPUser, which is false since onlyFirstLaneUsed is false. From the discussion at https://github.com/llvm/llvm-project/pull/142594#discussion_r2140339682 --- llvm/lib/Transforms/Vectorize/VPlan.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/VPlan.h b/llvm/lib/Transforms/Vectorize/VPlan.h index bbcbfee4e471b..5b8a80d5bbd21 100644 --- a/llvm/lib/Transforms/Vectorize/VPlan.h +++ b/llvm/lib/Transforms/Vectorize/VPlan.h @@ -2951,13 +2951,6 @@ class VPPredInstPHIRecipe : public VPSingleDefRecipe { void print(raw_ostream &O, const Twine &Indent, VPSlotTracker &SlotTracker) const override; #endif - - /// Returns true if the recipe uses scalars of operand \p Op. - bool usesScalars(const VPValue *Op) const override { - assert(is_contained(operands(), Op) && - "Op must be an operand of the recipe"); - return true; - } }; /// A common base class for widening memory operations. An optional mask can be