================ @@ -515,6 +515,24 @@ void VPInstruction::execute(VPTransformState &State) { State.set(this, GeneratedValue, Part); } } +bool VPInstruction::onlyFirstLaneUsed(const VPValue *Op) const { + assert(is_contained(operands(), Op) && "Op must be an operand of the recipe"); + if (Instruction::isBinaryOp(getOpcode())) + return vputils::onlyFirstLaneUsed(this); + + switch (getOpcode()) { + default: + return false; + case Instruction::ICmp: + return vputils::onlyFirstLaneUsed(this); + case VPInstruction::ActiveLaneMask: + case VPInstruction::CalculateTripCountMinusVF: + case VPInstruction::CanonicalIVIncrementForPart: + case VPInstruction::BranchOnCount: + return getOperand(0) == Op; ---------------- fhahn wrote:
Done, thanks! https://github.com/llvm/llvm-project/pull/80269 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits