[all-commits] [llvm/llvm-project] 8f7927: [ScalarEvolution] Fix pointer/int confusion in how...

Eli Friedman via All-commits all-commits at lists.llvm.org
Thu Sep 9 12:39:10 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8f792707c4e5208bba08d837504c93de28b1f209
      https://github.com/llvm/llvm-project/commit/8f792707c4e5208bba08d837504c93de28b1f209
  Author: Eli Friedman <efriedma at quicinc.com>
  Date:   2021-09-09 (Thu, 09 Sep 2021)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/no-wrap-symbolic-becount.ll

  Log Message:
  -----------
  [ScalarEvolution] Fix pointer/int confusion in howManyLessThans.

In general, howManyLessThans doesn't really want to work with pointers
at all; the result is an integer, and the operands of the icmp are
effectively integers.  However, isLoopEntryGuardedByCond doesn't like
extra ptrtoint casts, so the arguments to isLoopEntryGuardedByCond need
to be computed without those casts.

Somehow, the values got mixed up with the recent howManyLessThans
improvements; fix the confused values, and add a better comment to
explain what's happening.

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




More information about the All-commits mailing list