[llvm] [VPlan] Add VPRegionBlock::getCanonicalIVType (NFC). (PR #164127)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 08:45:57 PDT 2025
================
@@ -69,8 +69,7 @@ class UnrollState {
VPBasicBlock::iterator InsertPtForPhi);
VPValue *getConstantVPV(unsigned Part) {
- Type *CanIVIntTy =
- Plan.getVectorLoopRegion()->getCanonicalIV()->getScalarType();
+ Type *CanIVIntTy = Plan.getVectorLoopRegion()->getCanonicalIVType();
return Plan.getOrAddLiveIn(ConstantInt::get(CanIVIntTy, Part));
----------------
ayalz wrote:
Independent: perhaps useful to have a shortcut such as
```suggestion
return Plan.getConstantInt(CanIVIntTy, Part);
```
which will expand to getOrAddLiveIn(ConstantInt::get(T, V)).
https://github.com/llvm/llvm-project/pull/164127
More information about the llvm-commits
mailing list