[all-commits] [llvm/llvm-project] 92b708: [ValueTracking] Don't set nsw flag for inbounds ad...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Nov 13 08:58:44 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 92b708902e1db30a976e168111be5bbe81ee8191
      https://github.com/llvm/llvm-project/commit/92b708902e1db30a976e168111be5bbe81ee8191
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-11-13 (Fri, 13 Nov 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp

  Log Message:
  -----------
  [ValueTracking] Don't set nsw flag for inbounds addition

When computing the known bits for a GEP, don't set the nsw flag
when adding an offset to an address. The nsw flag only applies to
pure offset additions (see also D90708).

The nsw flag is only used in a very minor way by the code, to the
point that I was not able to come up with a test case where it
makes a difference.

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




More information about the All-commits mailing list