[all-commits] [llvm/llvm-project] a4bacb: [SelectionDAG] Remove redundant KnownBits smin and...

AtariDreams via All-commits all-commits at lists.llvm.org
Mon Apr 22 00:48:52 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a4bacb0f42ee8bd9d09baaae0fc0ff4650fbef2b
      https://github.com/llvm/llvm-project/commit/a4bacb0f42ee8bd9d09baaae0fc0ff4650fbef2b
  Author: AtariDreams <gfunni234 at gmail.com>
  Date:   2024-04-22 (Mon, 22 Apr 2024)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

  Log Message:
  -----------
  [SelectionDAG] Remove redundant KnownBits smin and smax operations (#89519)

It turns out that if any of the operations can be zero, and neither of
the operands can be proven to be positive, it is possible for smax to be
zero, and KnownBits cannot prove otherwise even with KnownBits::smax. In
fact, proving it based on the KnownBits itself at that point without
increasing the depth is actually, provably impossible.

Same with smin.

This covers all the possible cases and is proven to be complete.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list