[PATCH] D148931: [SCEV] Don't blindly transfer nowrap flags to pre-inc addrec

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Apr 23 22:00:54 PDT 2023


mkazantsev added a comment.

I don't quite understand your example. Two AddRecs with same start/step bound to one loop with different flags simply cannot exist, it would be one entity in UniqueSCEVs. And if we were able to infer `nuw` it for it in some situation, it means we have proven that it does not overflow (meaning that the loop doesn't make more than UINT_MAX iterations) regardless of uses.



================
Comment at: llvm/test/Analysis/ScalarEvolution/different-loops-recs.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_analyze_test_checks.py UTC_ARGS: --version 2
 ; RUN: opt -disable-output "-passes=print<scalar-evolution>" < %s 2>&1 | FileCheck %s
----------------
Precommit check regeneration?


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

https://reviews.llvm.org/D148931



More information about the llvm-commits mailing list