[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
Tue Feb 14 15:14:16 PST 2023


fhahn created this revision.
fhahn added reviewers: mkazantsev, nikic, reames.
Herald added subscribers: StephenFan, javed.absar, zzheng, hiraditya.
Herald added a project: All.
fhahn requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead.
Herald added a project: LLVM.

At the moment, proveNoWrapViaConstantRanges is only used when creating
SCEV[Zero,Sign]ExtendExprs. We can get significant improvements by
strengthening flags after creating the AddRec.

I'll also share a follow-up patch that removes the code to strengthen
flags when creating SCEV[Zero,Sign]ExtendExprs. Modifying AddRecs while
creating those can lead to surprising changes.

Compile-time looks neutral:
https://llvm-compile-time-tracker.com/compare.php?from=94676cf8a13c511a9acfc24ed53c98964a87bde3&to=aced434e8b103109104882776824c4136c90030d&stat=instructions:u


Repository:
  rG LLVM Github Monorepo

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/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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144050.497456.patch
Type: text/x-patch
Size: 320537 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230214/10e93ee2/attachment-0001.bin>


More information about the llvm-commits mailing list