[all-commits] [llvm/llvm-project] 47c559: [SCEV] Fold umin_seq to umin using implied poison ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu May 5 00:45:05 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47c559d6c1b5517f0b0210a3ce1580f1cedf1585
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-05-05 (Thu, 05 May 2022)

  Changed paths:
    M llvm/lib/Analysis/ScalarEvolution.cpp
    M llvm/test/Analysis/ScalarEvolution/exit-count-select-safe.ll

  Log Message:
  [SCEV] Fold umin_seq to umin using implied poison reasoning

Similar to how we convert logical and/or to bitwise and/or, we should
also convert umin_seq to umin based on implied poison reasoning. In
%x umin_seq %y, if %y being poison implies %x being poison, then we
don't need the sequential evaluation: Having %y contribute towards
the result will never make the result more poisonous. An important
corollary of this is that if %y is never poison, we also don't need
the sequential evaluation.

This avoids some of the regressions in D124910.

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

More information about the All-commits mailing list