[all-commits] [llvm/llvm-project] 6e1308: [SCEV][NFC] Simplify check with CI->isZero() exit ...

Max Kazantsev via All-commits all-commits at lists.llvm.org
Thu Oct 14 00:08:03 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e1308bc1027eb65d0d1297e4b5efa0a69d611d0
      https://github.com/llvm/llvm-project/commit/6e1308bc1027eb65d0d1297e4b5efa0a69d611d0
  Author: Max Kazantsev <mkazantsev at azul.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

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

  Log Message:
  -----------
  [SCEV][NFC] Simplify check with CI->isZero() exit condition

Replace check with
    if ((ExitIfTrue && CI->isZero()) || (!ExitIfTrue && CI->isOne()))
with equivalent and simpler version
    if (ExitIfTrue == CI->isZero())




More information about the All-commits mailing list