[llvm] [CVP][LVI] Add support for vectors (PR #97428)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 2 23:59:38 PDT 2024
================
@@ -844,6 +862,9 @@ static ConstantRange toConstantRange(const ValueLatticeElement &Val,
unsigned BW = Ty->getScalarSizeInBits();
if (Val.isUnknown())
return ConstantRange::getEmpty(BW);
+ if (Val.isConstant())
+ if (auto *VTy = dyn_cast<FixedVectorType>(Ty))
+ return getConstantRangeFromVector(Val.getConstant(), VTy);
----------------
nikic wrote:
Good point. I've added scalable vectors support.
https://github.com/llvm/llvm-project/pull/97428
More information about the llvm-commits
mailing list