[all-commits] [llvm/llvm-project] 19e83a: [ValueTracking] Pointer is known nonnull after loa...

Danila Kutenin via All-commits all-commits at lists.llvm.org
Wed Dec 11 11:41:23 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 19e83a9b4cd4b0c2918d975f52bdfc6ba82d839f
      https://github.com/llvm/llvm-project/commit/19e83a9b4cd4b0c2918d975f52bdfc6ba82d839f
  Author: Danila Kutenin <kutdanila at yandex.ru>
  Date:   2019-12-11 (Wed, 11 Dec 2019)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/test/Analysis/ValueTracking/known-nonnull-at.ll
    M llvm/test/CodeGen/PowerPC/pr39815.ll
    M llvm/test/Transforms/Coroutines/coro-swifterror.ll
    M llvm/test/Transforms/InstCombine/element-atomic-memintrins.ll
    M llvm/test/Transforms/InstCombine/phi-equal-incoming-pointers.ll
    M llvm/test/Transforms/InstCombine/sink-alloca.ll

  Log Message:
  -----------
  [ValueTracking] Pointer is known nonnull after load/store

If the pointer was loaded/stored before the null check, the check
is redundant and can be removed. For now the optimizers do not
remove the nullptr check, see https://gcc.godbolt.org/z/H2r5GG.
The patch allows to use more nonnull constraints. Also, it found
one more optimization in some PowerPC test. This is my first llvm
review, I am free to any comments.

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




More information about the All-commits mailing list