================ @@ -1011,6 +1011,31 @@ static Value *foldPHINodeOrSelectInst(Instruction &I) { return foldSelectInst(cast<SelectInst>(I)); } +/// Returns a fixed vector type equivalent to the memory set by II or nullptr if +/// unable to do so. +static FixedVectorType *getVectorTypeFor(const MemSetInst &II, + const DataLayout &DL) { + const ConstantInt *Length = dyn_cast<ConstantInt>(II.getLength()); + if (!Length) + return nullptr; + + APInt Val = Length->getValue(); + if (Val.ugt(std::numeric_limits<unsigned>::max())) + return nullptr; ---------------- arsenm wrote:
Don't understand this limit. Is this the maximum number of vector elements? Should avoid hardcoding that https://github.com/llvm/llvm-project/pull/133301 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits