[all-commits] [llvm/llvm-project] 5c85c3: [ValueTracking] Add tests for non equal shifts (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Mar 26 12:21:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c85c37c87d6c79bf2ee29c3c25456133861333e
      https://github.com/llvm/llvm-project/commit/5c85c37c87d6c79bf2ee29c3c25456133861333e
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-26 (Fri, 26 Mar 2021)

  Changed paths:
    M llvm/test/Analysis/ValueTracking/known-non-equal.ll

  Log Message:
  -----------
  [ValueTracking] Add tests for non equal shifts (NFC)


  Commit: 9666e89d577887cf574507207484a066588fc9ca
      https://github.com/llvm/llvm-project/commit/9666e89d577887cf574507207484a066588fc9ca
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-26 (Fri, 26 Mar 2021)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Analysis/ValueTracking/known-non-equal.ll

  Log Message:
  -----------
  [ValueTracking] Handle shl in isKnownNonEqual()

This handles the pattern X != X << C for non-zero X and C and a
non-overflowing shift. This establishes parity with the corresponing
fold for multiplies.


  Commit: fd7df0cf3873a0c9eef6cce4dab05551ff6e0e8d
      https://github.com/llvm/llvm-project/commit/fd7df0cf3873a0c9eef6cce4dab05551ff6e0e8d
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-26 (Fri, 26 Mar 2021)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Analysis/ValueTracking/known-non-equal.ll

  Log Message:
  -----------
  [ValueTracking] Handle shl pair in isKnownNonEqual()

Handle (x << s) != (y << s) where x != y and the shifts are
non-wrapping. Once again, this establishes parity with the
corresponing mul fold that already exists. The shift case is
more powerful because we don't need to guard against multiplies
by zero.


Compare: https://github.com/llvm/llvm-project/compare/8bc2c662d9c0...fd7df0cf3873


More information about the All-commits mailing list