[all-commits] [llvm/llvm-project] 205ed0: [SCEV] Handle zero stride correctly in howManyLess...

Philip Reames via All-commits all-commits at lists.llvm.org
Tue Jul 13 19:14:53 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 205ed009a44c2b04a15aea039d8947e74856f158
      https://github.com/llvm/llvm-project/commit/205ed009a44c2b04a15aea039d8947e74856f158
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2021-07-13 (Tue, 13 Jul 2021)

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

  Log Message:
  -----------
  [SCEV] Handle zero stride correctly in howManyLessThans

This is split from D105216, but the code is hoisted much earlier into
the path where we can actually get a zero stride flowing through. Some
fairly simple proofs handle the cases which show up in practice. The
only test changes are the cases where we really do need a non-zero
divider to produce the right result.

Recommitting with isLoopInvariant() check.

Differential Revision: https://reviews.llvm.org/D105921




More information about the All-commits mailing list