[all-commits] [llvm/llvm-project] f719cf: LAA: be less conservative in isNoWrap (#112553)

Ramkumar Ramachandra via All-commits all-commits at lists.llvm.org
Tue Oct 22 01:56:12 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f719cfa8685a30a3f4115cc0ce446262daf81244
      https://github.com/llvm/llvm-project/commit/f719cfa8685a30a3f4115cc0ce446262daf81244
  Author: Ramkumar Ramachandra <ramkumar.ramachandra at codasip.com>
  Date:   2024-10-22 (Tue, 22 Oct 2024)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Analysis/LoopAccessAnalysis/offset-range-known-via-assume.ll
    M llvm/test/Transforms/LoopVectorize/RISCV/induction-costs.ll
    M llvm/test/Transforms/LoopVersioning/wrapping-pointer-non-integral-addrspace.ll

  Log Message:
  -----------
  LAA: be less conservative in isNoWrap (#112553)

isNoWrap has exactly one caller which handles Assume = true separately,
but too conservatively. Instead, pass Assume to isNoWrap, so it is
threaded into getPtrStride, which has the correct handling for the
Assume flag. Also note that the Stride == 1 check in isNoWrap is
incorrect: getPtrStride returns Strides == 1 or -1, except when
isNoWrapAddRec or Assume are true, assuming ShouldCheckWrap is true; we
can include the case of -1 Stride, and when isNoWrapAddRec is true. With
this change, passing Assume = true to getPtrStride could return a
non-unit stride, and we correctly handle that case as well.



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