[all-commits] [llvm/llvm-project] e8c7e7: [ValueTracking] Add more known non zero tests (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Dec 26 06:56:06 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e8c7e7cdbbb12a485999a8b9d69e7138b3f34845
      https://github.com/llvm/llvm-project/commit/e8c7e7cdbbb12a485999a8b9d69e7138b3f34845
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-12-26 (Sat, 26 Dec 2020)

  Changed paths:
    M llvm/test/Transforms/InstCombine/known-non-zero.ll

  Log Message:
  -----------
  [ValueTracking] Add more known non zero tests (NFC)

Add tests for non-trivial conditions that imply non-zero on the
false branch rather than the true branch.

The last case already folds due to canonicalization.


  Commit: b21840751278128ef6942074ae89ea63c9c6ac58
      https://github.com/llvm/llvm-project/commit/b21840751278128ef6942074ae89ea63c9c6ac58
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-12-26 (Sat, 26 Dec 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Transforms/IndVarSimplify/X86/pr45360.ll
    M llvm/test/Transforms/InstCombine/known-non-zero.ll

  Log Message:
  -----------
  [ValueTracking] Handle more non-trivial conditions in isKnownNonZero()

In 35676a4f9a536a2aab768af63ddbb15bc722d7f9 I've added handling for
non-trivial dominating conditions that imply non-zero on the true
branch. This adds the same support for the false branch.

The changes in pr45360.ll change block ordering and naming, but
don't change the control flow. The urem is still guaraded by a
non-zero check correctly.


Compare: https://github.com/llvm/llvm-project/compare/622ea9cf74bc...b21840751278


More information about the All-commits mailing list