[all-commits] [llvm/llvm-project] 3c87f6: [BasicAA] Make use of nusw+nuw -> nneg implication...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Aug 7 03:47:43 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3c87f66b7e642790cafd877ff6b1fcb8a712c66a
      https://github.com/llvm/llvm-project/commit/3c87f66b7e642790cafd877ff6b1fcb8a712c66a
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-08-07 (Wed, 07 Aug 2024)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    A llvm/test/Analysis/BasicAA/nusw_nuw_nonneg.ll

  Log Message:
  -----------
  [BasicAA] Make use of nusw+nuw -> nneg implication (#102141)

If the GEP is both nuw and inbounds/nusw, the offset is non-negative.
Pass this information to CastedValue and make use of it when determining
the value range.

Proof for nusw+nuw->nneg: https://alive2.llvm.org/ce/z/a_CKAw
Proof for the test case: https://alive2.llvm.org/ce/z/yJ3ymP



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