[all-commits] [llvm/llvm-project] 04cd06: [SCEV] Use context sensitive reasoning in howFarTo...

Philip Reames via All-commits all-commits at lists.llvm.org
Wed Jun 19 08:59:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 04cd06906288dcb148de37d7c3e6c009c3e3b726
      https://github.com/llvm/llvm-project/commit/04cd06906288dcb148de37d7c3e6c009c3e3b726
  Author: Philip Reames <preames at rivosinc.com>
  Date:   2024-06-19 (Wed, 19 Jun 2024)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/trip-count-unknown-stride.ll
    M llvm/test/Transforms/LoopRotate/pr56260.ll

  Log Message:
  -----------
  [SCEV] Use context sensitive reasoning in howFarToZero (#94525)

This change builds on 0a357ad which supported non-constant strides in
howFarToZero, but used only context insensitive reasoning.

This change does two things:
1) Directly use context sensitive queries to prove facts established
   before the loop.  Note that we technically only need facts known
   at the latch, but using facts known on entry is a conservative
   approximation which will cover most everything.
2) For the non-zero check, we can usually prove non-zero from the
   finite assumption implied by mustprogress.  This eliminates the
   need to do the context sensitive query in the common case.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list