[llvm] [LV] Restrict widest induction type to be IntegerType (NFC) (PR #128173)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Sun Feb 23 13:39:54 PST 2025
================
@@ -693,11 +694,11 @@ void LoopVectorizationLegality::addInductionPhi(
const DataLayout &DL = Phi->getDataLayout();
// Get the widest type.
- if (!PhiTy->isFloatingPointTy()) {
+ if (PhiTy->isIntOrPtrTy()) {
if (!WidestIndTy)
- WidestIndTy = convertPointerToIntegerType(DL, PhiTy);
+ WidestIndTy = getInductionIntegerTy(DL, PhiTy);
else
- WidestIndTy = getWiderType(DL, PhiTy, WidestIndTy);
+ WidestIndTy = getWiderInductionTy(DL, PhiTy, WidestIndTy);
}
----------------
fhahn wrote:
can you add an `assert(PhiTy->isFloatingPointTy())` here?
https://github.com/llvm/llvm-project/pull/128173
More information about the llvm-commits
mailing list