[all-commits] [llvm/llvm-project] 8d54c8: [SCEV] Fix applyLoopGuards() with range check idio...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Sep 6 13:23:00 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d54c8a0c3d7d4a50186ae7087780c6082e5bb46
      https://github.com/llvm/llvm-project/commit/8d54c8a0c3d7d4a50186ae7087780c6082e5bb46
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/max-backedge-taken-count-guard-info.ll

  Log Message:
  -----------
  [SCEV] Fix applyLoopGuards() with range check idiom (PR51760)

Due to a typo, this replaced %x with umax(C1, umin(C2, %x + C3))
rather than umax(C1, umin(C2, %x)). This didn't make a difference
for the existing tests, because the result is only used for range
calculation, and %x will usually have an unknown starting range,
and the additional offset keeps it unknown. However, if %x already
has a known range, we may compute a result range that is too
small.




More information about the All-commits mailing list