================ @@ -1289,6 +1299,14 @@ static bool runImpl(Function &F, LazyValueInfo *LVI, DominatorTree *DT, FnChanged |= BBChanged; } + // Infer range attribute on return value. + if (RetRange && !RetRange->isFullSet()) { + Attribute RangeAttr = F.getRetAttribute(Attribute::Range); + if (RangeAttr.isValid()) + RetRange = RetRange->intersectWith(RangeAttr.getRange()); + if (!RetRange->isEmptySet() && !RetRange->isSingleElement()) + F.addRangeRetAttr(*RetRange); ---------------- goldsteinn wrote:
Missing `FnChanged = true`? https://github.com/llvm/llvm-project/pull/99620 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits