[llvm] [LV] Pass symbolic VF to CalculateTripCountMinusVF and CanonicalIVIncrementForPart (NFC) (PR #180542)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 11 09:17:37 PST 2026
================
@@ -467,7 +467,7 @@ void VPlanTransforms::unrollByUF(VPlan &Plan, unsigned UF) {
auto *VPI = dyn_cast<VPInstruction>(&R);
if (VPI &&
VPI->getOpcode() == VPInstruction::CanonicalIVIncrementForPart &&
- VPI->getNumOperands() == 1) {
----------------
fhahn wrote:
Sorry if it has not been clear from my coment above, I meant only trying to remove `VPUnrollPartAccessor` from `VPInstruction`, by replacing the part operand added here by creating VPInstruction here for `(zext/trunc VF to Ty) * Part` and add this as operand instead, so we don't need to lookup the part and scale during `::execute` at all. And example of a similar cleanup would be https://github.com/llvm/llvm-project/pull/172372.
If that is not trivial, better to leave out of the PR.
`VPUnrollPartAccessor` is a temporary measure, and remaining users are slowly migrated to be handled explicitly during unrolling, which enables further optimizations, and will allow to eventually remove the need for `VPUnrollPartAccessor` alltogether. I don't think we should change `VPUnrollPartAccessor` itself.
https://github.com/llvm/llvm-project/pull/180542
More information about the llvm-commits
mailing list