[PATCH] D144050: [SCEV] Strengthen nowrap flags via ranges for ARs on construction.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 18 10:29:35 PST 2023


fhahn updated this revision to Diff 498599.
fhahn marked an inline comment as done.
fhahn added a comment.
Herald added a reviewer: bollu.



In D144050#4135079 <https://reviews.llvm.org/D144050#4135079>, @nikic wrote:

> I think ideally we'd want this to happen in getOrCreateAddRec(), so we always infer these flags, even if the addrec is not created from IR. But a naive approach to that would probably run into issues because BE count calculation will need the addrec in the first place. So I think this patch is a reasonable starting point for now, and gets most of the test diff out of the way.

Agreed, doing it in getOrCreateAddRec would a nice follow-up improvement. I'll look into it.

> Note that there is a failing polly test.

Updated the failing test and restored the 2 tests pointed out.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144050/new/

https://reviews.llvm.org/D144050

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/Delinearization/multidim_only_ivs_3d_cast.ll
  llvm/test/Analysis/ScalarEvolution/addrec-computed-during-addrec-calculation.ll
  llvm/test/Analysis/ScalarEvolution/becount-invalidation.ll
  llvm/test/Analysis/ScalarEvolution/different-loops-recs.ll
  llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll
  llvm/test/Analysis/ScalarEvolution/exit-count-select.ll
  llvm/test/Analysis/ScalarEvolution/flags-from-poison.ll
  llvm/test/Analysis/ScalarEvolution/fold.ll
  llvm/test/Analysis/ScalarEvolution/incorrect-exit-count.ll
  llvm/test/Analysis/ScalarEvolution/increasing-or-decreasing-iv.ll
  llvm/test/Analysis/ScalarEvolution/limit-depth.ll
  llvm/test/Analysis/ScalarEvolution/logical-operations.ll
  llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info-rewrite-expressions.ll
  llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll
  llvm/test/Analysis/ScalarEvolution/max-trip-count.ll
  llvm/test/Analysis/ScalarEvolution/nsw.ll
  llvm/test/Analysis/ScalarEvolution/overflow-intrinsics.ll
  llvm/test/Analysis/ScalarEvolution/range-signedness.ll
  llvm/test/Analysis/ScalarEvolution/sext-iv-0.ll
  llvm/test/Analysis/ScalarEvolution/sext-iv-2.ll
  llvm/test/Analysis/ScalarEvolution/sext-to-zext.ll
  llvm/test/Analysis/ScalarEvolution/shift-recurrences.ll
  llvm/test/Analysis/ScalarEvolution/solve-quadratic-overflow.ll
  llvm/test/Analysis/ScalarEvolution/symbolic_max_exit_count.ll
  llvm/test/Analysis/ScalarEvolution/trip-count15.ll
  llvm/test/Analysis/ScalarEvolution/trivial-phis.ll
  llvm/test/Analysis/ScalarEvolution/umin-umax-folds.ll
  llvm/test/Analysis/ScalarEvolution/unknown_phis.ll
  llvm/test/Analysis/ScalarEvolution/widenable-condition.ll
  llvm/test/CodeGen/AMDGPU/combine-add-zext-xor.ll
  llvm/test/CodeGen/Thumb2/mve-laneinterleaving-reduct.ll
  llvm/test/Transforms/LoopStrengthReduce/lsr-rewrite-to-add-one.ll
  llvm/test/Transforms/LoopUnroll/peel-loop-conditions.ll
  llvm/test/Transforms/LoopVectorize/AArch64/interleave-allocsize-not-equal-typesize.ll
  llvm/test/Transforms/LoopVectorize/X86/load-deref-pred.ll
  llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll
  llvm/test/Transforms/LoopVectorize/first-order-recurrence.ll
  llvm/test/Transforms/LoopVectorize/pr55100-expand-scev-predicate-used.ll
  polly/test/ScopInfo/20111108-Parameter-not-detected.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144050.498599.patch
Type: text/x-patch
Size: 331148 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230218/f2a12aa9/attachment-0001.bin>


More information about the llvm-commits mailing list