[llvm] [CVP][LVI] Add support for vectors (PR #97428)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 4 00:20:05 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);
----------------
goldsteinn wrote:

Ah looks like you beat me too it

https://github.com/llvm/llvm-project/pull/97428


More information about the llvm-commits mailing list